Преглед на файлове

YARN-8535. Fix DistributedShell unit tests. Contributed by Abhishek Modi.

bibinchundatt преди 6 години
родител
ревизия
eed8415dc1

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-applications/hadoop-yarn-applications-distributedshell/src/main/java/org/apache/hadoop/yarn/applications/distributedshell/ApplicationMaster.java

@@ -944,7 +944,7 @@ public class ApplicationMaster {
 
     // When the application completes, it should send a finish application
     // signal to the RM
-    LOG.info("Application completed. Signalling finish to RM");
+    LOG.info("Application completed. Signalling finished to RM");
 
     FinalApplicationStatus appStatus;
     boolean success = true;

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

@@ -624,6 +624,7 @@ public class TestDistributedShell {
       String entityfileName) {
     String outputDirPathForEntity =
         basePath + File.separator + entityType + File.separator;
+    LOG.info(outputDirPathForEntity);
     File outputDirForEntity = new File(outputDirPathForEntity);
     Assert.assertTrue(outputDirForEntity.isDirectory());
 

+ 3 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-tests/src/test/java/org/apache/hadoop/yarn/server/MiniYARNCluster.java

@@ -577,7 +577,9 @@ public class MiniYARNCluster extends CompositeService {
       config.set(YarnConfiguration.NM_LOCALIZER_ADDRESS,
           MiniYARNCluster.getHostname() + ":0");
       config.set(YarnConfiguration.NM_COLLECTOR_SERVICE_ADDRESS,
-          MiniYARNCluster.getHostname() + ":0");
+          MiniYARNCluster.getHostname() + ":" +
+              ServerSocketUtil.getPort(
+                  YarnConfiguration.DEFAULT_NM_COLLECTOR_SERVICE_PORT, 10));
       WebAppUtils
           .setNMWebAppHostNameAndPort(config,
               MiniYARNCluster.getHostname(), 0);