Skip to main content
vtpcnk
Silver ⭐️⭐️⭐️
Mar 5, 2019 10:54 PM UTC
Solved

oozie shell action

I created a similar job as in : https://community.hortonworks.com/content/supportkb/48985/how-to-setup-oozie-shell-action.html

On execution the yarn log shows as success.

But I can't see the /tmp/output file being created anywhere. I checked on the local linux host as well as hdfs.

One question I have is in job.properties -

oozie.coord.application.path=${nameNode}/user/root/apps/shell


Should the configuration files (job.properties, coordinator.xml etc) reside in the above directory? I have them there.

Not sure what is happening.

Appreciate the insights.

KuldeepK
KuldeepKAnswer
Gold ⭐️
Mar 9, 2019 2:33 AM UTC

@n c

job.properties -> Needs to be on local filesystem on Oozie client from where you wish to submit the oozie job -run command. No need to have this file on HDFS.

workflow.xml -> This needs to be on HDFS.

script -> This needs to be on HDFS.


Regarding your question on python script - Please refer below article for how to create coordinator ( Please ignore input event part )

https://community.hortonworks.com/articles/27497/oozie-coordinator-and-based-on-input-data-events.html


in coordinator.xml you mention "<app-path>${workflowAppUri}</app-path>" that's what is location of workflow.xml


Please use Ambari workflow manager to design coordinators and workflows with easy WebUI.


Hope this helps.


Please let me know if you have any questions. Please accept my answer if it was helpful. 🙂

12 replies

vtpcnk
vtpcnkAuthor
Silver ⭐️⭐️⭐️
Mar 6, 2019 2:18 AM UTC

In the yarn log for the job I can see :


=================================================================

>>> Invoking Shell command line now >>

Exit code of the Shell command 0
<<< Invocation of Shell command completed <<<


<<< Invocation of Main class completed <<<


Oozie Launcher, capturing output data:
=======================

Translate
KuldeepK
Gold ⭐️
Gold ⭐️
Mar 7, 2019 3:01 AM UTC

Hi @n c

Can you please check on the node manager where this launcher was run, ideally this file should be created locally on the node manager where your shell script was run.

Please do let me know if you need any further help.

Translate
vtpcnk
vtpcnkAuthor
Silver ⭐️⭐️⭐️
Mar 7, 2019 3:01 AM UTC

@Kuldeep Kulkarni , any insights pls? Appreciate the help.

Translate
KuldeepK
Gold ⭐️
KuldeepKAnswer
Gold ⭐️
Mar 9, 2019 2:33 AM UTC

@n c

job.properties -> Needs to be on local filesystem on Oozie client from where you wish to submit the oozie job -run command. No need to have this file on HDFS.

workflow.xml -> This needs to be on HDFS.

script -> This needs to be on HDFS.


Regarding your question on python script - Please refer below article for how to create coordinator ( Please ignore input event part )

https://community.hortonworks.com/articles/27497/oozie-coordinator-and-based-on-input-data-events.html


in coordinator.xml you mention "<app-path>${workflowAppUri}</app-path>" that's what is location of workflow.xml


Please use Ambari workflow manager to design coordinators and workflows with easy WebUI.


Hope this helps.


Please let me know if you have any questions. Please accept my answer if it was helpful. 🙂

Translate
vtpcnk
vtpcnkAuthor
Silver ⭐️⭐️⭐️
Mar 9, 2019 2:58 AM UTC

Hi Kuldeep, thanks so much for the clarification.

I will try to do as per your instructions and let you know how it went.

Thanks again.

Translate
vtpcnk
vtpcnkAuthor
Silver ⭐️⭐️⭐️
Mar 9, 2019 2:59 AM UTC

BTW now I use cloudera. So I guess it has to be manual. Thanks.

Translate
vtpcnk
vtpcnkAuthor
Silver ⭐️⭐️⭐️
Mar 9, 2019 3:07 AM UTC

@Kuldeep Kulkarni , does your example : https://community.hortonworks.com/articles/27497/oozie-coordinator-and-based-on-input-data-events.html

set the job to run once a day?

If not, can you please let me know how to do that? I want to run a job once daily. Thanks.

Translate
KuldeepK
Gold ⭐️
Gold ⭐️
Mar 9, 2019 3:38 AM UTC

@n c
For some reason, I'm not able to add a comment in this post so replying as an answer:

For CDH, you can use Hue to design the submit the workflow.

For frequency - here is you can change the frequency of coordinator as per your requirement

 frequency="${coord:days(1)}"

Translate
vtpcnk
vtpcnkAuthor
Silver ⭐️⭐️⭐️
Mar 11, 2019 9:02 PM UTC

@Kuldeep Kulkarni, there are many lines with "input data" in the page you referred - not sure which ones to ignore.

Should I ignore the sections for datasets/input events/output events - that will leave only the workflow section.

Is that right?

Can't I use the coordinator from your shell action example?

But in that I don't see : "<app-path>${workflowAppUri}</app-path>"

Appreciate the clarification.

Translate