From ef94eeebb4bce5e4389d0d1bb57f163c1f6fbb73 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. (cherry picked from commit 763e96ea2b18f584ba102b68271263be8c5d621c) --- .../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 9f713d76578..b246b05569f 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 @@ -323,7 +323,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"); }