MAPREDUCE-3519. Fixed a deadlock in NodeManager LocalDirectories's handling service. Contributed by Ravi Gummadi.

svn merge -c 1212680 --ignore-ancestry ../../trunk


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1212681 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2011-12-09 23:19:59 +00:00
parent 0f3833fafe
commit f005c3223c
2 changed files with 10 additions and 29 deletions

View File

@ -209,6 +209,9 @@ Release 0.23.1 - Unreleased
MAPREDUCE-3513. Capacity Scheduler web UI has a spelling mistake for Memory.
(chackaravarthy via mahadev)
MAPREDUCE-3519. Fixed a deadlock in NodeManager LocalDirectories's handling
service. (Ravi Gummadi via vinodkv)
Release 0.23.0 - 2011-11-01
INCOMPATIBLE CHANGES

View File

@ -249,49 +249,27 @@ public class LocalDirsHandlerService extends AbstractService {
conf.setStrings(YarnConfiguration.NM_LOCAL_DIRS,
localDirs.toArray(new String[localDirs.size()]));
List<String> logDirs = getLogDirs();
synchronized(conf) {
conf.setStrings(YarnConfiguration.NM_LOG_DIRS,
conf.setStrings(YarnConfiguration.NM_LOG_DIRS,
logDirs.toArray(new String[logDirs.size()]));
}
}
public Path getLocalPathForWrite(String pathStr) throws IOException {
Configuration conf = getConfig();
Path path = null;
synchronized (conf) {
path = localDirsAllocator.getLocalPathForWrite(pathStr, conf);
}
return path;
return localDirsAllocator.getLocalPathForWrite(pathStr, getConfig());
}
public Path getLocalPathForWrite(String pathStr, long size,
boolean checkWrite) throws IOException {
Configuration conf = getConfig();
Path path = null;
synchronized (conf) {
path = localDirsAllocator.getLocalPathForWrite(pathStr, size, conf,
checkWrite);
}
return path;
return localDirsAllocator.getLocalPathForWrite(pathStr, size, getConfig(),
checkWrite);
}
public Path getLogPathForWrite(String pathStr, boolean checkWrite)
throws IOException {
Configuration conf = getConfig();
Path path = null;
synchronized (conf) {
path = logDirsAllocator.getLocalPathForWrite(pathStr,
LocalDirAllocator.SIZE_UNKNOWN, conf, checkWrite);
}
return path;
return logDirsAllocator.getLocalPathForWrite(pathStr,
LocalDirAllocator.SIZE_UNKNOWN, getConfig(), checkWrite);
}
public Path getLogPathToRead(String pathStr) throws IOException {
Configuration conf = getConfig();
Path path = null;
synchronized (conf) {
path = logDirsAllocator.getLocalPathToRead(pathStr, conf);
}
return path;
return logDirsAllocator.getLocalPathToRead(pathStr, getConfig());
}
}