hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jia...@apache.org
Subject [2/6] git commit: YARN-2682. Updated WindowsSecureContainerExecutor to not use DefaultContainerExecutor#getFirstApplicationDir and use getWorkingDir() instead. Contributed by Zhihai Xu (cherry picked from commit 0fd0ebae645e671699f6a6a56a012ebe6dfb5b2a)
Date Wed, 22 Oct 2014 23:27:31 GMT
YARN-2682. Updated WindowsSecureContainerExecutor to not use DefaultContainerExecutor#getFirstApplicationDir
and use getWorkingDir() instead. Contributed by Zhihai Xu
(cherry picked from commit 0fd0ebae645e671699f6a6a56a012ebe6dfb5b2a)

Conflicts:
	hadoop-yarn-project/CHANGES.txt
	hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a0575524
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a0575524
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a0575524

Branch: refs/heads/branch-2.6
Commit: a057552468c41bc5c5194dea07e798e7afeabfec
Parents: e282805
Author: Jian He <jianhe@apache.org>
Authored: Thu Oct 16 18:14:34 2014 -0700
Committer: Jian He <jianhe@apache.org>
Committed: Wed Oct 22 16:19:40 2014 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                               | 4 ++++
 .../yarn/server/nodemanager/DefaultContainerExecutor.java     | 7 +------
 .../server/nodemanager/WindowsSecureContainerExecutor.java    | 5 ++---
 3 files changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/a0575524/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 6bc9d67..df22042 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -321,6 +321,10 @@ Release 2.6.0 - UNRELEASED
     YARN-2709. Made timeline client getDelegationToken API retry if ConnectException
     happens. (Li Lu via zjshen)
 
+    YARN-2682. Updated WindowsSecureContainerExecutor to not use
+    DefaultContainerExecutor#getFirstApplicationDir and use getWorkingDir()
+    instead. (Zhihai Xu via jianhe) 
+
   OPTIMIZATIONS
 
   BUG FIXES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/a0575524/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
index 25810a7..76603ca 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java
@@ -462,11 +462,6 @@ public class DefaultContainerExecutor extends ContainerExecutor {
    * $logdir/$user/$appId */
   static final short LOGDIR_PERM = (short)0710;
 
-  protected Path getFirstApplicationDir(List<String> localDirs, String user,
-      String appId) {
-    return getApplicationDir(new Path(localDirs.get(0)), user, appId);
-  }
-
   private long getDiskFreeSpace(Path base) throws IOException {
     return lfs.getFsStatus(base).getRemaining();
   }
@@ -497,7 +492,7 @@ public class DefaultContainerExecutor extends ContainerExecutor {
     }
   }
 
-  private Path getWorkingDir(List<String> localDirs, String user,
+  protected Path getWorkingDir(List<String> localDirs, String user,
       String appId) throws IOException {
     Path appStorageDir = null;
     long totalAvailable = 0L;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/a0575524/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/WindowsSecureContainerExecutor.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/WindowsSecureContainerExecutor.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/WindowsSecureContainerExecutor.java
index ed82766..578a9a2 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/WindowsSecureContainerExecutor.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/WindowsSecureContainerExecutor.java
@@ -115,9 +115,8 @@ public class WindowsSecureContainerExecutor extends DefaultContainerExecutor
{
      createUserCacheDirs(localDirs, user);
      createAppDirs(localDirs, user, appId);
      createAppLogDirs(appId, logDirs, user);
-     
-     // TODO: Why pick first app dir. The same in LCE why not random?
-     Path appStorageDir = getFirstApplicationDir(localDirs, user, appId);
+
+     Path appStorageDir = getWorkingDir(localDirs, user, appId);
 
      String tokenFn = String.format(ContainerLocalizer.TOKEN_FILE_NAME_FMT, locId);
      Path tokenDst = new Path(appStorageDir, tokenFn);


Mime
View raw message