Author: ryota
Date: Wed Nov 27 01:23:02 2013
New Revision: 1545901
URL: http://svn.apache.org/r1545901
Log:
OOZIE-1615 shell action cannot find script file and fails in uber mode (ryota)
Modified:
oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
oozie/trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java
oozie/trunk/release-log.txt
Modified:
oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
URL:
http://svn.apache.org/viewvc/oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java?rev=1545901&r1=1545900&r2=1545901&view=diff
==============================================================================
---
oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
(original)
+++
oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
Wed Nov 27 01:23:02 2013
@@ -233,8 +233,13 @@ public class JavaActionExecutor extends
XConfiguration actionDefaultConf =
has.createActionDefaultConf(conf.get(HADOOP_JOB_TRACKER), getType());
injectLauncherProperties(actionDefaultConf, launcherConf);
injectLauncherProperties(inlineConf, launcherConf);
+ injectLauncherUseUberMode(launcherConf);
checkForDisallowedProps(launcherConf, "launcher
configuration");
XConfiguration.copy(launcherConf, conf);
+ } else {
+ XConfiguration launcherConf = new XConfiguration();
+ injectLauncherUseUberMode(launcherConf);
+ XConfiguration.copy(launcherConf, conf);
}
return conf;
}
@@ -248,7 +253,6 @@ public class JavaActionExecutor extends
if (launcherConf.get(HADOOP_YARN_UBER_MODE) == null) {
if
(getOozieConf().getBoolean("oozie.action.launcher.mapreduce.job.ubertask.enable",
false)) {
launcherConf.setBoolean(HADOOP_YARN_UBER_MODE, true);
- updateConfForUberMode(launcherConf);
}
}
}
@@ -734,7 +738,9 @@ public class JavaActionExecutor extends
}
// setting for uber mode
- injectLauncherUseUberMode(launcherJobConf);
+ if (launcherJobConf.getBoolean(HADOOP_YARN_UBER_MODE, false)) {
+ updateConfForUberMode(launcherJobConf);
+ }
// properties from action that are needed by the launcher (e.g.
QUEUE NAME, ACLs)
// maybe we should add queue to the WF schema, below job-tracker
Modified:
oozie/trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java
URL:
http://svn.apache.org/viewvc/oozie/trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java?rev=1545901&r1=1545900&r2=1545901&view=diff
==============================================================================
---
oozie/trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java
(original)
+++
oozie/trunk/core/src/test/java/org/apache/oozie/action/hadoop/TestShellActionExecutor.java
Wed Nov 27 01:23:02 2013
@@ -326,4 +326,24 @@ public class TestShellActionExecutor ext
return runningJob;
}
+ public void testShellMainPathInUber() throws Exception {
+
Services.get().getConf().setBoolean("oozie.action.launcher.mapreduce.job.ubertask.enable",
true);
+
+ Element actionXml = XmlUtils.parseXml("<shell>" + "<job-tracker>" +
getJobTrackerUri() + "</job-tracker>"
+ + "<name-node>" + getNameNodeUri() + "</name-node>" +
"<exec>script.sh</exec>"
+ + "<argument>a=A</argument>" + "<argument>b=B</argument>" +
"</shell>");
+ ShellActionExecutor ae = new ShellActionExecutor();
+ XConfiguration protoConf = new XConfiguration();
+ protoConf.set(WorkflowAppService.HADOOP_USER, getTestUser());
+
+ WorkflowJobBean wf = createBaseWorkflow(protoConf, "action");
+ WorkflowActionBean action = (WorkflowActionBean)
wf.getActions().get(0);
+ action.setType(ae.getType());
+
+ Context context = new Context(wf, action);
+ JobConf launcherConf = new JobConf();
+ launcherConf = ae.createLauncherConf(getFileSystem(), context, action,
actionXml, launcherConf);
+ // env
+ assertEquals("PATH=.:$PATH",
launcherConf.get(JavaActionExecutor.YARN_AM_ENV));
+ }
}
Modified: oozie/trunk/release-log.txt
URL:
http://svn.apache.org/viewvc/oozie/trunk/release-log.txt?rev=1545901&r1=1545900&r2=1545901&view=diff
==============================================================================
--- oozie/trunk/release-log.txt (original)
+++ oozie/trunk/release-log.txt Wed Nov 27 01:23:02 2013
@@ -1,5 +1,6 @@
-- Oozie 4.1.0 release (trunk - unreleased)
+OOZIE-1615 shell action cannot find script file and fails in uber mode (ryota)
OOZIE-1605 Add common custom filter applied to Wf/Coord/Bundle jobs on oozie
UI (ryota)
OOZIE-1474 Fix logging issues - latency, accurate job ids, coord Job UI to
show job logs (mona)
OOZIE-1623 JPAService doesn't need to do reads in a transaction (rkanter)