HADOOP-7900. LocalDirAllocator confChanged() accesses conf.get() twice. Contributed by Ravi Gummadi.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1299434 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uma Maheswara Rao G 2012-03-11 19:23:45 +00:00
parent 46a88ded0d
commit 42900bd080
2 changed files with 4 additions and 1 deletions

View File

@ -54,6 +54,9 @@ Trunk (unreleased changes)
BUG FIXES
HADOOP-7900. LocalDirAllocator confChanged() accesses conf.get() twice
(Ravi Gummadi via Uma Maheswara Rao G)
HADOOP-8146. FsShell commands cannot be interrupted
(Daryn Sharp via Uma Maheswara Rao G)

View File

@ -253,7 +253,7 @@ private synchronized void confChanged(Configuration conf)
throws IOException {
String newLocalDirs = conf.get(contextCfgItemName);
if (!newLocalDirs.equals(savedLocalDirs)) {
localDirs = conf.getTrimmedStrings(contextCfgItemName);
localDirs = StringUtils.getTrimmedStrings(newLocalDirs);
localFS = FileSystem.getLocal(conf);
int numDirs = localDirs.length;
ArrayList<String> dirs = new ArrayList<String>(numDirs);