Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-12416

BlockPlacementPolicyDefault will cause NN shutdown if log level is changed

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.7.4, 3.0.0-alpha3
    • None
    • block placement
    • 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

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            smao Suhan Mao
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 5h
              5h
              Remaining:
              Remaining Estimate - 5h
              5h
              Logged:
              Time Spent - Not Specified
              Not Specified

              Slack

                Issue deployment