Browse Source

YARN-4289. TestDistributedShell failing with bind exception. (Brahma Reddy Battula via stevel)

Steve Loughran 9 years ago
parent
commit
65b928d8c7

+ 3 - 0
hadoop-yarn-project/CHANGES.txt

@@ -934,6 +934,9 @@ Release 2.8.0 - UNRELEASED
     YARN-4294. [JDK8] Fix javadoc errors caused by wrong reference and illegal
     tag. (aajisaka)
 
+    YARN-4289. TestDistributedShell failing with bind exception.
+    (Brahma Reddy Battula via stevel)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

+ 3 - 0
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/test/java/org/apache/hadoop/yarn/applications/distributedshell/TestDistributedShell.java

@@ -39,6 +39,7 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileContext;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.net.NetUtils;
+import org.apache.hadoop.net.ServerSocketUtil;
 import org.apache.hadoop.util.JarFinder;
 import org.apache.hadoop.util.Shell;
 import org.apache.hadoop.yarn.api.records.ApplicationReport;
@@ -81,6 +82,8 @@ public class TestDistributedShell {
     conf.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true);
     conf.set(YarnConfiguration.RM_SCHEDULER, CapacityScheduler.class.getName());
     conf.setBoolean(YarnConfiguration.NODE_LABELS_ENABLED, true);
+    conf.set("mapreduce.jobhistory.address",
+        "0.0.0.0:" + ServerSocketUtil.getPort(10021, 10));
     
     if (yarnCluster == null) {
       yarnCluster =