hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdoug...@apache.org
Subject svn commit: r1097976 - in /hadoop/mapreduce/branches/MR-279: ./ mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/ yarn/yarn-server/yarn-server-nodemanager/src/main/c/container-executor/impl/ yarn/yarn-server/yarn-server-node...
Date Fri, 29 Apr 2011 22:25:10 GMT
Author: cdouglas
Date: Fri Apr 29 22:25:09 2011
New Revision: 1097976

URL: http://svn.apache.org/viewvc?rev=1097976&view=rev
Log:
Fix container launch w/ inconsistent credential file naming.

Modified:
    hadoop/mapreduce/branches/MR-279/CHANGES.txt
    hadoop/mapreduce/branches/MR-279/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/YarnChild.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/c/container-executor/impl/container-executor.h
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ContainerLocalizer.java

Modified: hadoop/mapreduce/branches/MR-279/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/CHANGES.txt?rev=1097976&r1=1097975&r2=1097976&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/CHANGES.txt (original)
+++ hadoop/mapreduce/branches/MR-279/CHANGES.txt Fri Apr 29 22:25:09 2011
@@ -4,6 +4,8 @@ Trunk (unreleased changes)
 
   MAPREDUCE-279
 
+    Fix container launch w/ inconsistent credential file naming. (cdouglas)
+
     Disable ContainerMonitoring for non-linux systems. (vinodkv)
 
     Fix file creation in JobHistoryEventHandler. (sharad)

Modified: hadoop/mapreduce/branches/MR-279/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/YarnChild.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/YarnChild.java?rev=1097976&r1=1097975&r2=1097976&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/YarnChild.java
(original)
+++ hadoop/mapreduce/branches/MR-279/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapred/YarnChild.java
Fri Apr 29 22:25:09 2011
@@ -211,7 +211,8 @@ class YarnChild {
   static Token<JobTokenIdentifier> loadCredentials(JobConf conf,
       InetSocketAddress address) throws IOException {
     //load token cache storage
-    String jobTokenFile = new Path("appTokens").makeQualified(FileSystem.getLocal(conf)).toUri().getPath();
+    String jobTokenFile =
+      new Path("container_tokens").makeQualified(FileSystem.getLocal(conf)).toUri().getPath();
     Credentials credentials =
       TokenCache.loadTokens(jobTokenFile, conf);
     LOG.debug("loading token. # keys =" +credentials.numberOfSecretKeys() +

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/c/container-executor/impl/container-executor.h
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/c/container-executor/impl/container-executor.h?rev=1097976&r1=1097975&r2=1097976&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/c/container-executor/impl/container-executor.h
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/c/container-executor/impl/container-executor.h
Fri Apr 29 22:25:09 2011
@@ -63,8 +63,7 @@ enum errorcodes {
 #define TT_LOCAL_TASK_DIR_PATTERN TT_JOB_DIR_PATTERN "/%s"
 #define TT_SYS_DIR_KEY "mapreduce.cluster.local.dir"
 #define TT_LOG_DIR_KEY "hadoop.log.dir"
-#define FILECACHE_FILENAME "appFiles"
-#define CREDENTIALS_FILENAME "appTokens"
+#define CREDENTIALS_FILENAME "container_tokens"
 #define MIN_USERID_KEY "min.user.id"
 #define BANNED_USERS_KEY "banned.users"
 

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java?rev=1097976&r1=1097975&r2=1097976&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
Fri Apr 29 22:25:09 2011
@@ -96,11 +96,12 @@ public class DefaultContainerExecutor ex
     Path launchDst = new Path(appWorkDir, ContainerLaunch.CONTAINER_SCRIPT);
     lfs.util().copy(launchScript, launchDst);
     // copy container tokens to work dir
-    String tokenFn = String.format(
+    Path appTokens = new Path(nmLocal, String.format(
         ContainerLocalizer.TOKEN_FILE_FMT,
-        ConverterUtils.toString(container.getContainerID()));
-    Path appTokens = new Path(nmLocal, tokenFn);
-    Path tokenDst = new Path(appWorkDir, tokenFn);
+        ConverterUtils.toString(container.getContainerID())));
+
+    Path tokenDst =
+      new Path(appWorkDir, ContainerLaunch.CONTAINER_TOKENS);
     lfs.util().copy(appTokens, tokenDst);
     // create log dir under app
     // fork script

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java?rev=1097976&r1=1097975&r2=1097976&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/launcher/ContainerLaunch.java
Fri Apr 29 22:25:09 2011
@@ -51,6 +51,7 @@ public class ContainerLaunch implements 
   private static final Log LOG = LogFactory.getLog(ContainerLaunch.class);
 
   public static final String CONTAINER_SCRIPT = "task.sh";
+  public static final String CONTAINER_TOKENS = "container_tokens";
 
   private final Dispatcher dispatcher;
   private final ContainerExecutor exec;

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ContainerLocalizer.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ContainerLocalizer.java?rev=1097976&r1=1097975&r2=1097976&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ContainerLocalizer.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/localizer/ContainerLocalizer.java
Fri Apr 29 22:25:09 2011
@@ -254,6 +254,7 @@ public class ContainerLocalizer {
           } catch (YarnRemoteException e) { }
           return;
         }
+        // TODO HB immediately when rsrc localized
         sleep(1);
       } catch (InterruptedException e) {
         return;



Mime
View raw message