Browse Source

HDFS-14166. Ls with -e option not giving the result in proper format. Contributed by Shubham Dewan.

(cherry picked from commit 763e96ea2b18f584ba102b68271263be8c5d621c)
Surendra Singh Lilhore 6 years ago
parent
commit
ef94eeebb4

+ 1 - 1
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");
     }