You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by vi...@apache.org on 2012/10/04 22:09:21 UTC
svn commit: r1394237 - in /oozie/trunk:
core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
core/src/test/java/org/apache/oozie/test/XTestCase.java release-log.txt
Author: virag
Date: Thu Oct 4 20:09:20 2012
New Revision: 1394237
URL: http://svn.apache.org/viewvc?rev=1394237&view=rev
Log:
OOZIE-993 Hadoop 23 doesn't accept user defined jobtracker (virag)
Modified:
oozie/trunk/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
oozie/trunk/core/src/test/java/org/apache/oozie/test/XTestCase.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=1394237&r1=1394236&r2=1394237&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 Thu Oct 4 20:09:20 2012
@@ -81,6 +81,7 @@ public class JavaActionExecutor extends
private static final String HADOOP_USER = "user.name";
private static final String HADOOP_JOB_TRACKER = "mapred.job.tracker";
private static final String HADOOP_JOB_TRACKER_2 = "mapreduce.jobtracker.address";
+ private static final String HADOOP_YARN_RM = "yarn.resourcemanager.address";
private static final String HADOOP_NAME_NODE = "fs.default.name";
private static final String HADOOP_JOB_NAME = "mapred.job.name";
public static final String OOZIE_COMMON_LIBDIR = "oozie";
@@ -104,6 +105,7 @@ public class JavaActionExecutor extends
DISALLOWED_PROPERTIES.add(HADOOP_JOB_TRACKER);
DISALLOWED_PROPERTIES.add(HADOOP_NAME_NODE);
DISALLOWED_PROPERTIES.add(HADOOP_JOB_TRACKER_2);
+ DISALLOWED_PROPERTIES.add(HADOOP_YARN_RM);
}
public JavaActionExecutor() {
@@ -203,6 +205,7 @@ public class JavaActionExecutor extends
conf.set(HADOOP_USER, context.getProtoActionConf().get(WorkflowAppService.HADOOP_USER));
conf.set(HADOOP_JOB_TRACKER, jobTracker);
conf.set(HADOOP_JOB_TRACKER_2, jobTracker);
+ conf.set(HADOOP_YARN_RM, jobTracker);
conf.set(HADOOP_NAME_NODE, nameNode);
conf.set("mapreduce.fileoutputcommitter.marksuccessfuljobs", "true");
return conf;
@@ -245,8 +248,8 @@ public class JavaActionExecutor extends
throw convertException(ex);
}
}
-
- public static void parseJobXmlAndConfiguration(Context context, Element element, Path appPath, Configuration conf)
+
+ public static void parseJobXmlAndConfiguration(Context context, Element element, Path appPath, Configuration conf)
throws IOException, ActionExecutorException, HadoopAccessorException, URISyntaxException {
Namespace ns = element.getNamespace();
Iterator<Element> it = element.getChildren("job-xml", ns).iterator();
@@ -267,8 +270,8 @@ public class JavaActionExecutor extends
XConfiguration.copy(inlineConf, conf);
}
}
-
- Configuration setupActionConf(Configuration actionConf, Context context, Element actionXml, Path appPath)
+
+ Configuration setupActionConf(Configuration actionConf, Context context, Element actionXml, Path appPath)
throws ActionExecutorException {
try {
HadoopAccessorService has = Services.get().get(HadoopAccessorService.class);
@@ -414,7 +417,7 @@ public class JavaActionExecutor extends
}
}
}
-
+
protected void addActionLibs(Path appPath, Configuration conf) throws ActionExecutorException {
String[] actionLibsStrArr = conf.getStrings("oozie.launcher.oozie.libpath");
if (actionLibsStrArr != null) {
@@ -461,7 +464,7 @@ public class JavaActionExecutor extends
addToCache(conf, appPath, path, false);
}
}
-
+
// Action libs
addActionLibs(appPath, conf);
Modified: oozie/trunk/core/src/test/java/org/apache/oozie/test/XTestCase.java
URL: http://svn.apache.org/viewvc/oozie/trunk/core/src/test/java/org/apache/oozie/test/XTestCase.java?rev=1394237&r1=1394236&r2=1394237&view=diff
==============================================================================
--- oozie/trunk/core/src/test/java/org/apache/oozie/test/XTestCase.java (original)
+++ oozie/trunk/core/src/test/java/org/apache/oozie/test/XTestCase.java Thu Oct 4 20:09:20 2012
@@ -537,10 +537,10 @@ public abstract class XTestCase extends
throw new RuntimeException(ex);
}
}
-
+
/**
* Wait the specified amount of time; the timeout will be scaled by the oozie.test.waitfor.ratio property.
- *
+ *
* @param sleepTime time in milliseconds to wait
*/
protected void sleep(int sleepTime) {
@@ -725,6 +725,10 @@ public abstract class XTestCase extends
mrCluster = new MiniMRCluster(0, 0, taskTrackers, nnURI, numDirs, racks, hosts, null, conf);
JobConf jobConf = mrCluster.createJobConf();
System.setProperty(OOZIE_TEST_JOB_TRACKER, jobConf.get("mapred.job.tracker"));
+ String rmAddress = jobConf.get("yarn.resourcemanager.address");
+ if (rmAddress != null) {
+ System.setProperty(OOZIE_TEST_JOB_TRACKER, rmAddress);
+ }
System.setProperty(OOZIE_TEST_NAME_NODE, jobConf.get("fs.default.name"));
ProxyUsers.refreshSuperUserGroupsConfiguration(conf);
}
Modified: oozie/trunk/release-log.txt
URL: http://svn.apache.org/viewvc/oozie/trunk/release-log.txt?rev=1394237&r1=1394236&r2=1394237&view=diff
==============================================================================
--- oozie/trunk/release-log.txt (original)
+++ oozie/trunk/release-log.txt Thu Oct 4 20:09:20 2012
@@ -24,6 +24,7 @@ OOZIE-979 bump up trunk version to 3.4.0
-- Oozie 3.3.0 release (unreleased)
+OOZIE-993 Hadoop 23 doesn't accept user defined jobtracker (virag)
OOZIE-1013 Build failing as the license header comment is appearing before xml declaration in some files (virag)
OOZIE-1007 Add license headers to all files don't have them (egashira via tucu)
OOZIE-1006 Oozie fails to add required dependency for Hadoop 3.0.2 (venkatesh via virag)