[ 
https://issues.apache.org/jira/browse/YARN-766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13679703#comment-13679703
 ] 

Chris Nauroth commented on YARN-766:
------------------------------------

Hi Sid,

There are a couple of other minor differences between trunk and branch-2 for 
{{TestNodeManagerShutdown}}.  Would you mind including those in your patch too, 
just so the files are identical and easier to maintain between the 2 branches?  
Below is the full output I'm seeing from {{git diff trunk branch-2 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerShutdown.java}}
 .

Thank you!

{code}
diff --git 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apa
index e0db826..95c1c10 100644
--- 
a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/had
+++ 
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/had
@@ -149,8 +149,8 @@ public void testKillContainersOnShutdown() throws 
IOException,
   }
 
   public static void startContainer(NodeManager nm, ContainerId cId,
-      FileContext localFS, File scriptFileDir, File processStartFile)
-      throws IOException, YarnException {
+      FileContext localFS, File scriptFileDir, File processStartFile) 
+          throws IOException, YarnException {
     File scriptFile =
         createUnhaltingScriptFile(cId, scriptFileDir, processStartFile);
     
@@ -158,7 +158,7 @@ public static void startContainer(NodeManager nm, 
ContainerId cId,
         recordFactory.newRecordInstance(ContainerLaunchContext.class);
 
     NodeId nodeId = BuilderUtils.newNodeId("localhost", 1234);
-    
+ 
     URL localResourceUri =
         ConverterUtils.getYarnUrlFromPath(localFS
             .makeQualified(new Path(scriptFile.getAbsolutePath())));
@@ -235,7 +235,7 @@ private YarnConfiguration createNMConfig() {
    */
   private static File createUnhaltingScriptFile(ContainerId cId,
       File scriptFileDir, File processStartFile) throws IOException {
-    File scriptFile = Shell.appendScriptExtension(scriptFileDir, "scriptFile");
+    File scriptFile = new File(scriptFileDir, "scriptFile.sh");
     PrintWriter fileWriter = new PrintWriter(scriptFile);
     if (Shell.WINDOWS) {
       fileWriter.println("@echo \"Running testscript for delayed kill\"");
@@ -272,4 +272,4 @@ public void setMasterKey(MasterKey masterKey) {
       getNMContext().getContainerTokenSecretManager().setMasterKey(masterKey);
     }
   }
-}
\ No newline at end of file
+}
{code}

                
> TestNodeManagerShutdown should use Shell to form the output path
> ----------------------------------------------------------------
>
>                 Key: YARN-766
>                 URL: https://issues.apache.org/jira/browse/YARN-766
>             Project: Hadoop YARN
>          Issue Type: Bug
>    Affects Versions: 2.1.0-beta
>            Reporter: Siddharth Seth
>            Priority: Minor
>         Attachments: YARN-766.txt
>
>
> File scriptFile = new File(tmpDir, "scriptFile.sh");
> should be replaced with
> File scriptFile = Shell.appendScriptExtension(tmpDir, "scriptFile");
> to match trunk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to