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

ExtendedBlock#hashCode should use both blockId and block pool ID

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.5.0
    • Component/s: federation
    • Labels:
      None
    • Target Version/s:

      Description

      ExtendedBlock#hashCode contains both a block pool ID and a block ID. The equals function checks both. However, hashCode only uses block ID. Since HDFS-4645, block IDs are now allocated sequentially. This means that there will be a lot of hash collisions when federation is in use. We should use both block ID and block pool ID in hashCode to prevent this.

        Attachments

        1. HDFS-5381.001.patch
          0.6 kB
          Colin P. McCabe
        2. HDFS-5381.002.patch
          2 kB
          Benoy Antony

          Issue Links

            Activity

              People

              • Assignee:
                benoyantony Benoy Antony
                Reporter:
                cmccabe Colin P. McCabe
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: