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:11:02 UTC

svn commit: r1394238 - in /oozie/branches/branch-3.3: 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:11:01 2012
New Revision: 1394238

URL: http://svn.apache.org/viewvc?rev=1394238&view=rev
Log:
OOZIE-993 Hadoop 23 doesn't accept user defined jobtracker (virag)

Modified:
    oozie/branches/branch-3.3/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
    oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/test/XTestCase.java
    oozie/branches/branch-3.3/release-log.txt

Modified: oozie/branches/branch-3.3/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java
URL: http://svn.apache.org/viewvc/oozie/branches/branch-3.3/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java?rev=1394238&r1=1394237&r2=1394238&view=diff
==============================================================================
--- oozie/branches/branch-3.3/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java (original)
+++ oozie/branches/branch-3.3/core/src/main/java/org/apache/oozie/action/hadoop/JavaActionExecutor.java Thu Oct  4 20:11:01 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";
     public static final String OOZIE_COMMON_LIBDIR = "oozie";
     public static final int MAX_EXTERNAL_STATS_SIZE_DEFAULT = Integer.MAX_VALUE;
@@ -103,6 +104,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() {
@@ -202,6 +204,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;
@@ -244,8 +247,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();
@@ -266,8 +269,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);
@@ -413,7 +416,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) {
@@ -460,7 +463,7 @@ public class JavaActionExecutor extends 
                 addToCache(conf, appPath, path, false);
             }
         }
-        
+
         // Action libs
         addActionLibs(appPath, conf);
 

Modified: oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/test/XTestCase.java
URL: http://svn.apache.org/viewvc/oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/test/XTestCase.java?rev=1394238&r1=1394237&r2=1394238&view=diff
==============================================================================
--- oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/test/XTestCase.java (original)
+++ oozie/branches/branch-3.3/core/src/test/java/org/apache/oozie/test/XTestCase.java Thu Oct  4 20:11:01 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/branches/branch-3.3/release-log.txt
URL: http://svn.apache.org/viewvc/oozie/branches/branch-3.3/release-log.txt?rev=1394238&r1=1394237&r2=1394238&view=diff
==============================================================================
--- oozie/branches/branch-3.3/release-log.txt (original)
+++ oozie/branches/branch-3.3/release-log.txt Thu Oct  4 20:11:01 2012
@@ -1,5 +1,6 @@
 -- 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 2.0.2 (venkatesh via virag)