Bläddra i källkod

Merge r1574262 from branch-2

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2.4@1574263 13f79535-47bb-0310-9956-ffa450edef68
Haohui Mai 11 år sedan
förälder
incheckning
8320d382b5

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -40,6 +40,9 @@ Release 2.4.0 - UNRELEASED
     HADOOP-10314. The ls command help still shows outdated 0.16 format.
     (Rushabh S Shah via kihwal)
 
+    HADOOP-8691. FsShell can print "Found xxx items" unnecessarily often.
+    (Daryn Sharp via wheat9)
+
   OPTIMIZATIONS
 
   BUG FIXES

+ 1 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Ls.java

@@ -104,7 +104,7 @@ class Ls extends FsCommand {
   @Override
   protected void processPaths(PathData parent, PathData ... items)
   throws IOException {
-    if (!isRecursive() && items.length != 0) {
+    if (parent != null && !isRecursive() && items.length != 0) {
       out.println("Found " + items.length + " items");
     }
     adjustColumnWidths(items);