Community Articles

Find and share helpful community-sourced technical articles.
Labels (2)
avatar
Master Guru

Step by step guide - Shell action in oozie workflow via Hue

Step1: Create a sample shell script and upload it to hdfs

[root@sandbox shell]# cat ~/sample.sh
#!/bin/bash
echo "`date` hi" > /tmp/output
hadoop fs -put sample.sh /user/hue/oozie/workspaces/
[root@sandbox shell]# hadoop fs -ls /user/hue/oozie/workspaces/
-rw-r--r--   3 root              hdfs         44 2016-02-15 10:26 /user/hue/oozie/workspaces/sample.sh

Step 2: Login to Hue Web UI and select Oozie editor/dashboard

2144-screen-shot-2016-02-15-at-50706-pm.png

Step3: Goto "Workflows" tab and click on "Create" button

2146-screen-shot-2016-02-15-at-50728-pm.png

Step 4: Fill in the required details and click on save button

2147-screen-shot-2016-02-15-at-50907-pm.png

Step 5: Drag shell action between start and end phase

2148-screen-shot-2016-02-15-at-50921-pm.png

Step 6: Fill in the required details about shell action and click on "Done" button

2149-screen-shot-2016-02-15-at-50953-pm.png

Step 7: Submit your workflow

2150-screen-shot-2016-02-15-at-51018-pm.png

You will see that your job is in progress

Output 1

2151-screen-shot-2016-02-15-at-51024-pm.png

Output 2

2152-screen-shot-2016-02-15-at-51046-pm.png

13,898 Views
Comments
avatar

Hi @KuldeepK ,

I am trying to pass the dynamic parameter values from the shell scripts.
And I am unable to do that.

IF you have tried can you please let me know how to do that. I tried in the CLI it works fine with the XML code. But I am trying to use the hue editor to design the oozie workflows I am unable to pass the parameters from the shell script