HDFS-12177. NameNode exits due to setting BlockPlacementPolicy loglevel to Debug. Contributed by Jiandan Yang.
This commit is contained in:
parent
f3bf1a6eb9
commit
f65dc6ee95
|
@ -718,7 +718,7 @@ public class BlockPlacementPolicyDefault extends BlockPlacementPolicy {
|
||||||
}
|
}
|
||||||
Preconditions.checkState(excludedNodes.add(chosenNode), "chosenNode "
|
Preconditions.checkState(excludedNodes.add(chosenNode), "chosenNode "
|
||||||
+ chosenNode + " is already in excludedNodes " + excludedNodes);
|
+ chosenNode + " is already in excludedNodes " + excludedNodes);
|
||||||
if (LOG.isDebugEnabled()) {
|
if (LOG.isDebugEnabled() && builder != null) {
|
||||||
builder.append("\nNode ").append(NodeBase.getPath(chosenNode))
|
builder.append("\nNode ").append(NodeBase.getPath(chosenNode))
|
||||||
.append(" [");
|
.append(" [");
|
||||||
}
|
}
|
||||||
|
@ -747,7 +747,7 @@ public class BlockPlacementPolicyDefault extends BlockPlacementPolicy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LOG.isDebugEnabled()) {
|
if (LOG.isDebugEnabled() && builder != null) {
|
||||||
builder.append("\n]");
|
builder.append("\n]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue