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

(cherry picked from commit 763e96ea2b)
This commit is contained in:
Surendra Singh Lilhore 2018-12-22 12:22:24 +05:30
parent d6baf9d5bf
commit 5ab79f6377
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@ class Ls extends FsCommand {
int maxEC = 0; int maxEC = 0;
for (PathData item : items) { for (PathData item : items) {
ContentSummary contentSummary = item.fs.getContentSummary(item.path); 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"); fmt.append((maxEC > 0) ? "%-" + maxEC + "s " : "%s");
} }