- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to run Oozie Job with Python Script in Sandbox?
- Labels:
-
Apache Hadoop
-
Apache Oozie
Created ‎01-03-2017 05:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎01-04-2017 12:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am mobile and can't comment on your workflows right now but I have example of python2 and python3 WF in my repo https://github.com/dbist/oozie
Browse to oozie/apps/ and you will see their respective directories. Use as you wish.
Created ‎01-04-2017 12:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am mobile and can't comment on your workflows right now but I have example of python2 and python3 WF in my repo https://github.com/dbist/oozie
Browse to oozie/apps/ and you will see their respective directories. Use as you wish.
Created ‎01-04-2017 04:39 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your prompt reply. But I have a very basic question. Python should be install in the Sandbox? apps-directory.png Currently my python scripts are placed in /root/examples/apps/map-reduce/ But I am guessing there should be a python folder in root/examples/apps/Python? which contains the job.properties and workflow.xml files in addition to the lib folder would be great if you could guide in which directory should I place the python script files
Created ‎01-04-2017 08:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@justlearning same version of Python needs to be installed on every node that will run oozie containers (nodemanager). Same goes for any Python libraries you're importing into your script. I usually create the following tree
admin@u1201:~/oozie/apps/python$ tree . |-- job.properties |-- scripts | `-- script.py `-- workflow.xml 1 directory, 3 files
so what you want is a workflow directory on hdfs with at least workflow.xml and optionally another directory within it with a Python script. job.properties file needs to be on your local filesystem. Then you would execute the oozie wf the following way:
oozie job -oozie http://u1203.ambari.apache.org:11000/oozie -config oozie/apps/python/job.properties -run
Created ‎01-05-2017 06:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Artem Ervits ohh thank you so much .. How do you determine where the output of the job should be store/ how can you see the output to be sure it was what you're looking for
Created ‎01-06-2017 01:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can learn that by following this guide https://community.hortonworks.com/content/kbentry/9148/troubleshooting-an-oozie-flow.html
Created ‎01-06-2017 10:37 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's a good practice to accept answer if it satisfies your needs.
