Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
2.7.4, 3.0.0-alpha3
-
None
-
None
Description
In BlockPlacementPolicyDefault.chooseRandom method.
The code are in below structure:
StringBuilder builder = null; if (LOG.isDebugEnabled()) { builder = debugLoggingBuilder.get(); builder.setLength(0); builder.append("["); } while(numOfReplicas > 0){ ............. chooseDataNode(scope, excludedNodes) ............. if (LOG.isDebugEnabled()) { builder.append("\nNode ").append(NodeBase.getPath(chosenNode)) .append(" ["); } }
There's a possibility that the loglevel is INFO before entering while loop, but the loglevel is changed to DEBUG inside the loop through web UI.
In that case, builder is not initialized in the beginning and NullPointerException will throw and this will cause NN exiting.
Attachments
Attachments
Issue Links
- relates to
-
HDFS-11827 NPE is thrown when log level changed in BlockPlacementPolicyDefault#chooseRandom() method
- Resolved
-
HDFS-12177 NameNode exits due to setting BlockPlacementPolicy loglevel to Debug
- Resolved