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

Incorrect getSnapshottableDirListing() javadoc

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0-beta
    • Fix Version/s: 3.0.4, 3.1.2, 3.3.0, 3.2.1
    • Component/s: snapshots
    • Labels:
      None

      Description

      The Javadoc for DistributedFileSystem#getSnapshottableDirListing() is not consistent with FSNamesystem#getSnapshottableDirListing()

      ClientProtocol#getSnapshottableDirListing()
      /**
         * Get listing of all the snapshottable directories.
         *
         * @return Information about all the current snapshottable directory
         * @throws IOException If an I/O error occurred
         */
        @Idempotent
        @ReadOnly(isCoordinated = true)
        SnapshottableDirectoryStatus[] getSnapshottableDirListing()
            throws IOException;
      
      DistributedFileSystem#getSnapshottableDirListing()
      /**
         * @return All the snapshottable directories
         * @throws IOException
         */
        public SnapshottableDirectoryStatus[] getSnapshottableDirListing()
      

      But the implementation at NameNode side is:

      FSNamesystem#getSnapshottableDirListing()
      /**
         * Get the list of snapshottable directories that are owned 
         * by the current user. Return all the snapshottable directories if the 
         * current user is a super user.
         * @return The list of all the current snapshottable directories
         * @throws IOException
         */
        public SnapshottableDirectoryStatus[] getSnapshottableDirListing()
      

      That is, if this method is called by a non-super user, it does not return all snapshottable directories. File this jira to get this corrected to avoid confusion.

        Attachments

        1. HDFS-14228.00.patch
          3 kB
          Dinesh Chitlangia

          Activity

            People

            • Assignee:
              dineshchitlangia Dinesh Chitlangia
              Reporter:
              jojochuang Wei-Chiu Chuang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: