From e81398da81571d52aca4cd0d19b43791fa396863 Mon Sep 17 00:00:00 2001 From: Haohui Mai Date: Wed, 5 Mar 2014 00:03:56 +0000 Subject: [PATCH] Merge r1574261 from trunk git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1574262 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../src/main/java/org/apache/hadoop/fs/shell/Ls.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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);