From 763e96ea2b18f584ba102b68271263be8c5d621c Mon Sep 17 00:00:00 2001 From: Surendra Singh Lilhore Date: Sat, 22 Dec 2018 12:22:24 +0530 Subject: [PATCH] HDFS-14166. Ls with -e option not giving the result in proper format. Contributed by Shubham Dewan. --- .../src/main/java/org/apache/hadoop/fs/shell/Ls.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 19383d009cf..32084fc8fef 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 @@ -345,7 +345,7 @@ class Ls extends FsCommand { int maxEC = 0; for (PathData item : items) { ContentSummary contentSummary = item.fs.getContentSummary(item.path); - maxEC=maxLength(maxEC,contentSummary.getErasureCodingPolicy().length()); + maxEC = maxLength(maxEC, contentSummary.getErasureCodingPolicy()); } fmt.append((maxEC > 0) ? "%-" + maxEC + "s " : "%s"); }