Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-2547

ReplicationTargetChooser has incorrect block placement comments

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.20.1
    • Fix Version/s: 1.1.0
    • Component/s: namenode
    • Labels:
      None

      Description

      /** The class is responsible for choosing the desired number of targets
       * for placing block replicas.
       * The replica placement strategy is that if the writer is on a datanode,
       * the 1st replica is placed on the local machine, 
       * otherwise a random datanode. The 2nd replica is placed on a datanode
       * that is on a different rack. The 3rd replica is placed on a datanode
       * which is on the same rack as the **first replca**.
       */
      

      That should read "second replica". The test cases confirm that this is the behavior, as well as the docs.

      1. HDFS-2547.patch
        1 kB
        Harsh J
      2. HDFS-2547.patch
        0.8 kB
        Harsh J

        Activity

        Harsh J created issue -
        Harsh J made changes -
        Field Original Value New Value
        Attachment HDFS-2547.patch [ 12503161 ]
        Harsh J made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Harsh J made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Harsh J made changes -
        Resolution Invalid [ 6 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Harsh J made changes -
        Summary Design doc is wrong about default block placement policy. ReplicationTargetChooser has incorrect block placement comments
        Fix Version/s 0.20.206.0 [ 12317959 ]
        Fix Version/s 0.24.0 [ 12317653 ]
        Description bq. For the common case, when the replication factor is three, HDFS's placement policy is to put one replica on one node in the local rack, another on a node in a different (remote) rack, and the last on a different node in the same *remote* rack.

        Should actually be: "and the last on a different node in the same *local* rack."
        {code}
        /** The class is responsible for choosing the desired number of targets
         * for placing block replicas.
         * The replica placement strategy is that if the writer is on a datanode,
         * the 1st replica is placed on the local machine,
         * otherwise a random datanode. The 2nd replica is placed on a datanode
         * that is on a different rack. The 3rd replica is placed on a datanode
         * which is on the same rack as the **first replca**.
         */
        {code}

        That should read "second replica". The test cases confirm that this is the behavior, as well as the docs.
        Harsh J made changes -
        Attachment HDFS-2547.patch [ 12503369 ]
        Harsh J made changes -
        Status Reopened [ 4 ] Patch Available [ 10002 ]
        Harsh J made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Matt Foley made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Harsh J
            Reporter:
            Harsh J
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development