From 45caeee6cfcf1ae3355cd880402159cf31e94a8a Mon Sep 17 00:00:00 2001 From: Dinesh Chitlangia Date: Fri, 25 Jan 2019 07:34:48 -0800 Subject: [PATCH] HDFS-14228. Incorrect getSnapshottableDirListing() javadoc. Contributed by Dinesh Chitlangia. Signed-off-by: Wei-Chiu Chuang --- .../org/apache/hadoop/hdfs/DistributedFileSystem.java | 7 +++++-- .../org/apache/hadoop/hdfs/protocol/ClientProtocol.java | 9 +++++---- .../apache/hadoop/hdfs/server/namenode/FSNamesystem.java | 6 +++--- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java index a1af465b24e..48d50e5e383 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java @@ -1976,8 +1976,11 @@ public Void next(final FileSystem fs, final Path p) } /** - * @return All the snapshottable directories - * @throws IOException + * 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 If an I/O error occurred. */ public SnapshottableDirectoryStatus[] getSnapshottableDirListing() throws IOException { diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java index 3f339456070..260d7a21ab5 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java @@ -696,10 +696,11 @@ DirectoryListing getListing(String src, byte[] startAfter, boolean needLocation) throws IOException; /** - * Get listing of all the snapshottable directories. - * - * @return Information about all the current snapshottable directory - * @throws IOException If an I/O error occurred + * 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 If an I/O error occurred. */ @Idempotent @ReadOnly(isCoordinated = true) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java index a644c9bf17e..ea7db4d04b4 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java @@ -6598,13 +6598,13 @@ void renameSnapshot( logAuditEvent(success, operationName, oldSnapshotRoot, newSnapshotRoot, null); } - + /** * 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 + * @return The list of all the current snapshottable directories. + * @throws IOException If an I/O error occurred. */ public SnapshottableDirectoryStatus[] getSnapshottableDirListing() throws IOException {