MAPREDUCE-3519. Fixed a deadlock in NodeManager LocalDirectories's handling service. Contributed by Ravi Gummadi.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1212680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ad7d537caa
commit
b0d3781b64
@ -258,6 +258,9 @@ Release 0.23.1 - Unreleased
|
|||||||
MAPREDUCE-3513. Capacity Scheduler web UI has a spelling mistake for Memory.
|
MAPREDUCE-3513. Capacity Scheduler web UI has a spelling mistake for Memory.
|
||||||
(chackaravarthy via mahadev)
|
(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
|
Release 0.23.0 - 2011-11-01
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -249,49 +249,27 @@ private void updateDirsInConfiguration() {
|
|||||||
conf.setStrings(YarnConfiguration.NM_LOCAL_DIRS,
|
conf.setStrings(YarnConfiguration.NM_LOCAL_DIRS,
|
||||||
localDirs.toArray(new String[localDirs.size()]));
|
localDirs.toArray(new String[localDirs.size()]));
|
||||||
List<String> logDirs = getLogDirs();
|
List<String> logDirs = getLogDirs();
|
||||||
synchronized(conf) {
|
|
||||||
conf.setStrings(YarnConfiguration.NM_LOG_DIRS,
|
conf.setStrings(YarnConfiguration.NM_LOG_DIRS,
|
||||||
logDirs.toArray(new String[logDirs.size()]));
|
logDirs.toArray(new String[logDirs.size()]));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public Path getLocalPathForWrite(String pathStr) throws IOException {
|
public Path getLocalPathForWrite(String pathStr) throws IOException {
|
||||||
Configuration conf = getConfig();
|
return localDirsAllocator.getLocalPathForWrite(pathStr, getConfig());
|
||||||
Path path = null;
|
|
||||||
synchronized (conf) {
|
|
||||||
path = localDirsAllocator.getLocalPathForWrite(pathStr, conf);
|
|
||||||
}
|
|
||||||
return path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Path getLocalPathForWrite(String pathStr, long size,
|
public Path getLocalPathForWrite(String pathStr, long size,
|
||||||
boolean checkWrite) throws IOException {
|
boolean checkWrite) throws IOException {
|
||||||
Configuration conf = getConfig();
|
return localDirsAllocator.getLocalPathForWrite(pathStr, size, getConfig(),
|
||||||
Path path = null;
|
|
||||||
synchronized (conf) {
|
|
||||||
path = localDirsAllocator.getLocalPathForWrite(pathStr, size, conf,
|
|
||||||
checkWrite);
|
checkWrite);
|
||||||
}
|
}
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Path getLogPathForWrite(String pathStr, boolean checkWrite)
|
public Path getLogPathForWrite(String pathStr, boolean checkWrite)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
Configuration conf = getConfig();
|
return logDirsAllocator.getLocalPathForWrite(pathStr,
|
||||||
Path path = null;
|
LocalDirAllocator.SIZE_UNKNOWN, getConfig(), checkWrite);
|
||||||
synchronized (conf) {
|
|
||||||
path = logDirsAllocator.getLocalPathForWrite(pathStr,
|
|
||||||
LocalDirAllocator.SIZE_UNKNOWN, conf, checkWrite);
|
|
||||||
}
|
|
||||||
return path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Path getLogPathToRead(String pathStr) throws IOException {
|
public Path getLogPathToRead(String pathStr) throws IOException {
|
||||||
Configuration conf = getConfig();
|
return logDirsAllocator.getLocalPathToRead(pathStr, getConfig());
|
||||||
Path path = null;
|
|
||||||
synchronized (conf) {
|
|
||||||
path = logDirsAllocator.getLocalPathToRead(pathStr, conf);
|
|
||||||
}
|
|
||||||
return path;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user