Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A07FC200D1B for ; Thu, 12 Oct 2017 11:37:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9F2E2160BE6; Thu, 12 Oct 2017 09:37:43 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BF5E9160BE4 for ; Thu, 12 Oct 2017 11:37:42 +0200 (CEST) Received: (qmail 34112 invoked by uid 500); 12 Oct 2017 09:37:31 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 32793 invoked by uid 99); 12 Oct 2017 09:37:30 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2017 09:37:30 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 658E2DFE2C; Thu, 12 Oct 2017 09:37:29 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sunilg@apache.org To: common-commits@hadoop.apache.org Date: Thu, 12 Oct 2017 09:38:11 -0000 Message-Id: <0e6bfe7e3fc24a7ba5e88462aae74ada@git.apache.org> In-Reply-To: <3a9215b583aa4750bfb592574d6ea6bd@git.apache.org> References: <3a9215b583aa4750bfb592574d6ea6bd@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [44/50] [abbrv] hadoop git commit: HDFS-12542. Update javadoc and documentation for listStatus. Contributed by Ajay Kumar. archived-at: Thu, 12 Oct 2017 09:37:43 -0000 HDFS-12542. Update javadoc and documentation for listStatus. Contributed by Ajay Kumar. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/8acdf5c2 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/8acdf5c2 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/8acdf5c2 Branch: refs/heads/YARN-5881 Commit: 8acdf5c2742c081f3e0e96e13eb940a39964a58f Parents: bb0a742 Author: Arpit Agarwal Authored: Wed Oct 11 12:29:35 2017 -0700 Committer: Arpit Agarwal Committed: Wed Oct 11 12:29:35 2017 -0700 ---------------------------------------------------------------------- .../apache/hadoop/hdfs/web/WebHdfsFileSystem.java | 16 ++++++++++++++++ .../hadoop/fs/http/client/HttpFSFileSystem.java | 18 ++++++++++++------ .../hadoop-hdfs/src/site/markdown/WebHDFS.md | 5 +++++ 3 files changed, 33 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/8acdf5c2/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java index d3a8b23..0fb6f22 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/web/WebHdfsFileSystem.java @@ -1495,6 +1495,15 @@ public class WebHdfsFileSystem extends FileSystem } } + /** + * Get {@link FileStatus} of files/directories in the given path. If path + * corresponds to a file then {@link FileStatus} of that file is returned. + * Else if path represents a directory then {@link FileStatus} of all + * files/directories inside given path is returned. + * + * @param f given path + * @return the statuses of the files/directories in the given path + */ @Override public FileStatus[] listStatus(final Path f) throws IOException { statistics.incrementReadOps(1); @@ -1519,6 +1528,13 @@ public class WebHdfsFileSystem extends FileSystem private static final byte[] EMPTY_ARRAY = new byte[] {}; + /** + * Get DirectoryEntries of the given path. DirectoryEntries contains an array + * of {@link FileStatus}, as well as iteration information. + * + * @param f given path + * @return DirectoryEntries for given path + */ @Override public DirectoryEntries listStatusBatch(Path f, byte[] token) throws FileNotFoundException, IOException { http://git-wip-us.apache.org/repos/asf/hadoop/blob/8acdf5c2/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java index 3ff7a61..ffd64a1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/client/HttpFSFileSystem.java @@ -705,14 +705,13 @@ public class HttpFSFileSystem extends FileSystem } /** - * List the statuses of the files/directories in the given path if the path is - * a directory. + * Get {@link FileStatus} of files/directories in the given path. If path + * corresponds to a file then {@link FileStatus} of that file is returned. + * Else if path represents a directory then {@link FileStatus} of all + * files/directories inside given path is returned. * * @param f given path - * - * @return the statuses of the files/directories in the given patch - * - * @throws IOException + * @return the statuses of the files/directories in the given path */ @Override public FileStatus[] listStatus(Path f) throws IOException { @@ -725,6 +724,13 @@ public class HttpFSFileSystem extends FileSystem return toFileStatuses(json, f); } + /** + * Get {@link DirectoryEntries} of the given path. {@link DirectoryEntries} + * contains an array of {@link FileStatus}, as well as iteration information. + * + * @param f given path + * @return {@link DirectoryEntries} for given path + */ @Override public DirectoryEntries listStatusBatch(Path f, byte[] token) throws FileNotFoundException, IOException { http://git-wip-us.apache.org/repos/asf/hadoop/blob/8acdf5c2/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/WebHDFS.md ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/WebHDFS.md b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/WebHDFS.md index 73c6558..4a1395e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/WebHDFS.md +++ b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/WebHDFS.md @@ -467,6 +467,8 @@ See also: [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).getFileSt { "accessTime" : 1320171722771, "blockSize" : 33554432, + "childrenNum" : 0, + "fileId" : 16388, "group" : "supergroup", "length" : 24930, "modificationTime": 1320171722771, @@ -474,11 +476,14 @@ See also: [FileSystem](../../api/org/apache/hadoop/fs/FileSystem.html).getFileSt "pathSuffix" : "a.patch", "permission" : "644", "replication" : 1, + "storagePolicy" : 0, "type" : "FILE" }, { "accessTime" : 0, "blockSize" : 0, + "childrenNum" : 0, + "fileId" : 16389, "group" : "supergroup", "length" : 0, "modificationTime": 1320895981256, --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-commits-help@hadoop.apache.org