diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 905d647c145..451f43b2d00 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -55,6 +55,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 diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Ls.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Ls.java index eecd3b03ad1..dff7719afe0 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/Ls.java +++ b/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);