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

RBF: The constructor of PathLocation may got some misunderstanding

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: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.4.0
    • rbf
    • None
    • Reviewed

    Description

      There is a constructor of PathLocation as follows, it's for creating a new PathLocation with a prioritised nsId. 

       

      public PathLocation(PathLocation other, String firstNsId) {
        this.sourcePath = other.sourcePath;
        this.destOrder = other.destOrder;
        this.destinations = orderedNamespaces(other.destinations, firstNsId);
      }
      

      When I was reading the code of MultipleDestinationMountTableResolver, I thought this constructor was to create a PathLocation with an override destination. It took me a while before I realize this is a constructor to sort the destinations inside.

      Maybe I think this constructor can be more clear about its usage?

       

      Attachments

        1. HDFS-15579-001.patch
          3 kB
          Janus Chow
        2. HDFS-15579-002.patch
          3 kB
          Janus Chow
        3. HDFS-15579-003.patch
          3 kB
          Janus Chow
        4. HDFS-15579-004.patch
          4 kB
          Janus Chow
        5. HDFS-15579-005.patch
          4 kB
          Janus Chow

        Activity

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

          People

            Symious Janus Chow Assign to me
            Symious Janus Chow
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment