sahara-extra/edp-adapt-for-oozie
Luigi Toscano b7c24df858 Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org
counterparts.
(bonus point: fix also a leftover github URL.)

Change-Id: Ie24652d525b1d2859594b271500a4d32aa5b2d34
2019-04-20 13:51:25 +02:00
..
src/main/java/org/openstack/sahara/edp Add main function wrapper for edp.java.adapt_for_oozie config 2014-12-09 17:18:26 +09:00
README.rst Replace git.openstack.org URLs with opendev.org URLs 2019-04-20 13:51:25 +02:00
pom.xml Add main function wrapper for edp.java.adapt_for_oozie config 2014-12-09 17:18:26 +09:00

README.rst

Sources for main function wrapper that adapt for oozie

In order to pass configurations to MapReduce Application through oozie, it is necessary to add the following code. (https://opendev.org/openstack/sahara-tests/src/branch/master/sahara_tests/scenario/defaults/edp-examples/edp-java/README.rst)

// This will add properties from the <configuration> tag specified // in the Oozie workflow. For java actions, Oozie writes the // configuration values to a file pointed to by ooze.action.conf.xml conf.addResource(new Path("file:///", System.getProperty("oozie.action.conf.xml")));

This wrapper adds a above configuration file to a default resources and invoke actual main function.

And this wrapper provides workaround for oozie's System.exit problem. (https://oozie.apache.org/docs/4.0.0/WorkflowFunctionalSpec.html#a3.2.7_Java_Action) In caller of oozie, System.exit is converted to exception. The application can call System.exit multiple times.

This wrapper stores the argument of System.exit called in first. And return stored value if System.exit is called multiple times.