hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suhan Mao (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-12416) BlockPlacementPolicyDefault will cause NN shutdown if log level is changed
Date Mon, 11 Sep 2017 10:48:00 GMT
Suhan Mao created HDFS-12416:
--------------------------------

             Summary: BlockPlacementPolicyDefault will cause NN shutdown if log level is changed
                 Key: HDFS-12416
                 URL: https://issues.apache.org/jira/browse/HDFS-12416
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: block placement
    Affects Versions: 3.0.0-alpha3, 2.7.4
            Reporter: Suhan Mao


In BlockPlacementPolicyDefault.chooseRandom method.
The code are in below structure:
{code:java}
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(" [");
      }
}
{code}

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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org


Mime
View raw message