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

Optimize method BlockInfoStriped#findSlot to reduce time complexity.

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersStop watchingWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.4.0
    • 3.4.0
    • hdfs
    • Reviewed

    Description

      Currently, in method findSlot. there exists codes snippet below:

      for (; i < getCapacity(); i++) {
        if (getStorageInfo(i) == null) {
          return i;
        }
      } 

      it will compute (triplets.length / 3 every iteration, I think this can be optimized.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            zhanghaobo farmmamba Assign to me
            zhanghaobo farmmamba
            Votes:
            0 Vote for this issue
            Watchers:
            3 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment