At first, the file "/home/hduser/wdetl/weatherETL.sh" needs to be in HDFS. Then 
you can use <file> tag to make it available to run on compute node.
If you need more specific example, please let me know.





________________________________
 From: Savitha Devi Inbasekaran <[email protected]>
To: "[email protected]" <[email protected]> 
Sent: Tuesday, April 23, 2013 3:19 AM
Subject: running jar file in shell script
 

I am trying to run a shell script with jar file but I am getting an exception 
"Can't open /home/hduser/wdetl/weatherETL.sh
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.ShellMain], 
exit code [1]". The shell script and oozie workflow are given below.


------------ weatherETL.sh ---------------
#!/bin/bash
cd /home/hduser/wdetl
java -jar dist/WeatherData.jar
cd ~
------------oozie workflow----------
<workflow-app xmlns="uri:oozie:workflow:0.2" name="weather-etl">

     <start to="shell-etlforweather"/>

     <action name="shell-etlforweather">
         <shell xmlns="uri:oozie:shell-action:0.1">
             <job-tracker>${jobTracker}</job-tracker>
             <name-node>${nameNode}</name-node>
             <configuration>
                 <property>
                     <name>mapred.job.queue.name</name>
                     <value>${queueName}</value>
                 </property>
             </configuration>
             <exec>sh</exec>
<argument>/home/hduser/wdetl/weatherETL.sh</argument>

         </shell>
                <ok to="end"/>
         <error to="fail"/>
     </action>
<kill name="fail">
         <message>Node failed, error
message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
Thanks,
Savitha

Reply via email to