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

Fix and clarify INodeInPath getter functions

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

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.6.0
    • None
    • None

    Description

      inodes is initialized with the number of patch components. After resolve, it contains both non-null and null elements (introduced by dot-snapshot dirs).
      When getINodes is called, an array is returned excluding all non elements, which is the correct behavior. Meanwhile, the inodes array is trimmed too, which shouldn't be done by a getter.
      Because of the above, the behavior of getINodesInPath depends on whether getINodes has been called, which is not correct.
      The name of getLastINodeInPath is confusing – it actually returns the last non-null inode in the path. Also, shouldn't the return type be a single INode?

      Attachments

        1. HDFS-7104-20140924-v3.patch
          4 kB
          Zhe Zhang
        2. HDFS-7104-20140924-v2.patch
          4 kB
          Zhe Zhang
        3. HDFS-7104-20140924-v1.patch
          4 kB
          Zhe Zhang
        4. HDFS-7104-20140923-v3.patch
          2 kB
          Zhe Zhang
        5. HDFS-7104-20140923-v1.patch
          4 kB
          Zhe Zhang

        Issue Links

        Activity

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

          People

            zhz Zhe Zhang
            zhz Zhe Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment