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

ExtendedBlock#hashCode should use both blockId and block pool ID

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.0
    • 2.5.0
    • federation
    • None

    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.002.patch
          2 kB
          Benoy Antony
        2. HDFS-5381.001.patch
          0.6 kB
          Colin McCabe

        Issue Links

          Activity

            People

              benoyantony Benoy Antony
              cmccabe Colin McCabe
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: