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

cleanup unnecssary code logic in LocatedBlock

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

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.7.0
    • 2.7.0
    • None
    • None
    • Reviewed

    Description

      1. The usage of following two variables is unnecessary. We can remove them to make code a bit brief.

        private final boolean hasStorageIDs;
        private final boolean hasStorageTypes;

      2. In HDFS-7647, no need to modify LocatedBlock#getStorageTypes and LocatedBlock#getStorageIDs, we just need to update the cached storageIDs and storageTypes after sort.
      3. Another thing is we'd better setSoftwareVersion when constructing DatanodeInfoWithStorage from DatanodeInfo

      Attachments

        Issue Links

        Activity

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

          People

            hitliuyi Yi Liu Assign to me
            hitliuyi Yi Liu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment