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

ExtendedBlock#hashCode should use both blockId and block pool ID

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    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 McCabe
        2. HDFS-5381.002.patch
          2 kB
          Benoy Antony

        Issue Links

          Activity

            People

            • Assignee:
              benoyantony Benoy Antony
              Reporter:
              cmccabe Colin McCabe

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment