OOZIE-1696 Document how to get the action conf in the Java action (jrkinley via 
rkanter)


Project: http://git-wip-us.apache.org/repos/asf/oozie/repo
Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/1292c7f8
Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/1292c7f8
Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/1292c7f8

Branch: refs/remotes/trunk
Commit: 1292c7f8bb130132e82dea57e07adf3163de9a12
Parents: 0894702
Author: Robert Kanter <[email protected]>
Authored: Fri Sep 26 12:50:06 2014 -0700
Committer: Robert Kanter <[email protected]>
Committed: Fri Sep 26 12:50:06 2014 -0700

----------------------------------------------------------------------
 docs/src/site/twiki/WorkflowFunctionalSpec.twiki | 18 ++++++++++++++----
 release-log.txt                                  |  1 +
 2 files changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oozie/blob/1292c7f8/docs/src/site/twiki/WorkflowFunctionalSpec.twiki
----------------------------------------------------------------------
diff --git a/docs/src/site/twiki/WorkflowFunctionalSpec.twiki 
b/docs/src/site/twiki/WorkflowFunctionalSpec.twiki
index 43fddbb..e6e52a0 100644
--- a/docs/src/site/twiki/WorkflowFunctionalSpec.twiki
+++ b/docs/src/site/twiki/WorkflowFunctionalSpec.twiki
@@ -1437,10 +1437,20 @@ starting the Java application. This capability enables 
Oozie to retry a Java app
 or non-transient failure (This can be used to cleanup any temporary data which 
may have been created by the Java
 application in case of failure).
 
-A =java= action can create a Hadoop configuration. The Hadoop configuration is 
made available as a local file to the
-Java application in its running directory, the file name is 
=oozie-action.conf.xml=. Similar to =map-reduce= and
- =pig= actions it is possible to refer a =job.xml= file and using inline 
configuration properties. For repeated
-configuration properties later values override earlier ones.
+A =java= action can create a Hadoop configuration for interacting with a 
cluster (e.g. launching a map-reduce job).
+Oozie prepares a Hadoop configuration file which includes the environments 
site configuration files (e.g. hdfs-site.xml, 
+mapred-site.xml, etc) plus the properties added to the =<configuration>= 
section of the =java= action. The Hadoop configuration 
+file is made available as a local file to the Java application in its running 
directory. It can be added to the =java= actions 
+Hadoop configuration by referencing the system property: 
=oozie-action.conf.xml=. For example:
+
+<verbatim>
+// loading action conf prepared by Oozie
+Configuration actionConf = new Configuration(false);
+actionConf.addResource(new Path("file:///", 
System.getProperty("oozie.action.conf.xml")));
+</verbatim>
+
+If =oozie.action.conf.xml= is not added then the job will pick up the 
mapred-default properties and this may result
+in unexpected behaviour. For repeated configuration properties later values 
override earlier ones.
 
 Inline property values can be parameterized (templatized) using EL expressions.
 

http://git-wip-us.apache.org/repos/asf/oozie/blob/1292c7f8/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index c5ec39a..ba512c5 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 4.2.0 release (trunk - unreleased)
 
+OOZIE-1696 Document how to get the action conf in the Java action (jrkinley 
via rkanter)
 OOZIE-1567 Provide a wait tool in Oozie (rkanter)
 OOZIE-2014 TestAuthFilterAuthOozieClient fails after OOZIE-1917 (rkanter)
 OOZIE-1917 Authentication secret should be random by default and needs to 
coordinate with HA (rkanter)

Reply via email to