Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Bash script in HDFS isn't able to read file at same folder

avatar
Explorer

Hello, 

 

I'm trying to run a bash script located at a HDFS folder via oozie workflow. This script has a lot o configurations to be done by the user, and they are passed to the script via a file the script has to read and is put at the same HDFS folder as the script. The script cannot read it, though, and I wonder if I should comply with some specific path configurations for this to work on HDFS. 

 

When this code here is reached: 

 

if  [ ! -e `pwd`/vars.sh  ] ; then
  echo "Unable to continue: file vars.sh doesn't exist!"
  exit 1
fi

the script exits. Is the "pwd" a problem? I know that it pressuposes that the oozie workflow would respect the path of execution of my script. Is this a mistake?

 

Thanks! 

1 ACCEPTED SOLUTION

avatar
Explorer
There was a file missing in the workflow's file addition via hue. Solved adding the path to the specific file on HUE's oozie editor

View solution in original post

1 REPLY 1

avatar
Explorer
There was a file missing in the workflow's file addition via hue. Solved adding the path to the specific file on HUE's oozie editor