YARN-2682. Updated WindowsSecureContainerExecutor to not use DefaultContainerExecutor#getFirstApplicationDir and use getWorkingDir() instead. Contributed by Zhihai Xu
(cherry picked from commit 0fd0ebae64
)
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
This commit is contained in:
parent
e282805f1c
commit
a057552468
|
@ -321,6 +321,10 @@ Release 2.6.0 - UNRELEASED
|
||||||
YARN-2709. Made timeline client getDelegationToken API retry if ConnectException
|
YARN-2709. Made timeline client getDelegationToken API retry if ConnectException
|
||||||
happens. (Li Lu via zjshen)
|
happens. (Li Lu via zjshen)
|
||||||
|
|
||||||
|
YARN-2682. Updated WindowsSecureContainerExecutor to not use
|
||||||
|
DefaultContainerExecutor#getFirstApplicationDir and use getWorkingDir()
|
||||||
|
instead. (Zhihai Xu via jianhe)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -462,11 +462,6 @@ public class DefaultContainerExecutor extends ContainerExecutor {
|
||||||
* $logdir/$user/$appId */
|
* $logdir/$user/$appId */
|
||||||
static final short LOGDIR_PERM = (short)0710;
|
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 {
|
private long getDiskFreeSpace(Path base) throws IOException {
|
||||||
return lfs.getFsStatus(base).getRemaining();
|
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 {
|
String appId) throws IOException {
|
||||||
Path appStorageDir = null;
|
Path appStorageDir = null;
|
||||||
long totalAvailable = 0L;
|
long totalAvailable = 0L;
|
||||||
|
|
|
@ -116,8 +116,7 @@ public class WindowsSecureContainerExecutor extends DefaultContainerExecutor {
|
||||||
createAppDirs(localDirs, user, appId);
|
createAppDirs(localDirs, user, appId);
|
||||||
createAppLogDirs(appId, logDirs, user);
|
createAppLogDirs(appId, logDirs, user);
|
||||||
|
|
||||||
// TODO: Why pick first app dir. The same in LCE why not random?
|
Path appStorageDir = getWorkingDir(localDirs, user, appId);
|
||||||
Path appStorageDir = getFirstApplicationDir(localDirs, user, appId);
|
|
||||||
|
|
||||||
String tokenFn = String.format(ContainerLocalizer.TOKEN_FILE_NAME_FMT, locId);
|
String tokenFn = String.format(ContainerLocalizer.TOKEN_FILE_NAME_FMT, locId);
|
||||||
Path tokenDst = new Path(appStorageDir, tokenFn);
|
Path tokenDst = new Path(appStorageDir, tokenFn);
|
||||||
|
|
Loading…
Reference in New Issue