Browse Source

Ensure NM uses the right LocalDirAllocator.getLocalPathForWrite call which doesn't interfere with disk-fail-in-place.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/MR-279@1157296 13f79535-47bb-0310-9956-ffa450edef68
Arun Murthy 14 years ago
parent
commit
fd914cb585

+ 3 - 0
mapreduce/CHANGES.txt

@@ -4,6 +4,9 @@ Trunk (unreleased changes)
 
   MAPREDUCE-279
 
+    Ensure NM uses the right LocalDirAllocator.getLocalPathForWrite call which
+    doesn't interfere with disk-fail-in-place. (acmurthy)
+
     MAPREDUCE-2808. pull MAPREDUCE-2797 into mr279 branch (thomas graves via mahadev)
 
     Fixed CS locality wait factor. (acmurthy)

+ 7 - 4
mapreduce/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java

@@ -100,7 +100,7 @@ public class ContainerLaunch implements Callable<Integer> {
       String appIdStr = app.toString();
       Path containerLogDir =
           this.logDirsSelector.getLocalPathForWrite(appIdStr + Path.SEPARATOR
-              + containerIdStr, LocalDirAllocator.SIZE_UNKNOWN, this.conf);
+              + containerIdStr, LocalDirAllocator.SIZE_UNKNOWN, this.conf, false);
       for (String str : command) {
         // TODO: Should we instead work via symlinks without this grammar?
         newCmds.add(str.replace(ApplicationConstants.LOG_DIR_EXPANSION_VAR,
@@ -129,7 +129,9 @@ public class ContainerLaunch implements Callable<Integer> {
           lDirAllocator.getLocalPathForWrite(
               ResourceLocalizationService.NM_PRIVATE_DIR + Path.SEPARATOR
                   + appIdStr + Path.SEPARATOR + containerIdStr
-                  + Path.SEPARATOR + CONTAINER_SCRIPT, this.conf);
+                  + Path.SEPARATOR + CONTAINER_SCRIPT, 
+                  LocalDirAllocator.SIZE_UNKNOWN, 
+                  this.conf, false);
       Path nmPrivateTokensPath =
           lDirAllocator.getLocalPathForWrite(
               ResourceLocalizationService.NM_PRIVATE_DIR
@@ -137,7 +139,8 @@ public class ContainerLaunch implements Callable<Integer> {
                   + containerIdStr
                   + Path.SEPARATOR
                   + String.format(ContainerLocalizer.TOKEN_FILE_NAME_FMT,
-                      containerIdStr), this.conf);
+              containerIdStr), LocalDirAllocator.SIZE_UNKNOWN, 
+              this.conf, false);
       DataOutputStream containerScriptOutStream = null;
       DataOutputStream tokensOutStream = null;
 
@@ -147,7 +150,7 @@ public class ContainerLaunch implements Callable<Integer> {
               + Path.SEPARATOR + user + Path.SEPARATOR
               + ContainerLocalizer.APPCACHE + Path.SEPARATOR + appIdStr
               + Path.SEPARATOR + containerIdStr,
-              LocalDirAllocator.SIZE_UNKNOWN, this.conf);
+              LocalDirAllocator.SIZE_UNKNOWN, this.conf, false);
       try {
         // /////////// Write out the container-script in the nmPrivate space.
         String[] localDirs =