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

Fix confusing LOG message for block replication

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.8.3
    • Fix Version/s: 3.1.0
    • Component/s: hdfs
    • Labels:
      None

      Description

      In our cluster we see large number of log messages such as the following:

      2017-12-15 22:55:54,603 INFO org.apache.hadoop.hdfs.server.namenode.FSDirectory: Increasing replication from 3 to 3 for <HDFS file>
      

      This is a little confusing since "from 3 to 3" is not "increasing". Digging into it, it seems related to this piece of code:

          if (oldBR != -1) {
            if (oldBR > targetReplication) {
              FSDirectory.LOG.info("Decreasing replication from {} to {} for {}",
                                   oldBR, targetReplication, iip.getPath());
            } else {
              FSDirectory.LOG.info("Increasing replication from {} to {} for {}",
                                   oldBR, targetReplication, iip.getPath());
            }
          }
      

      Perhaps a oldBR == targetReplication case is missing?

        Attachments

        1. HDFS-12932.0.patch
          0.9 kB
          Chao Sun
        2. HDFS-12932.1.patch
          1 kB
          Chao Sun

          Activity

            People

            • Assignee:
              csun Chao Sun
              Reporter:
              csun Chao Sun
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: