HDFS-15895 : Remove redundant String#format in DFSAdmin#printOpenFiles (#2772)
(cherry picked from commit 9c43b60348
)
This commit is contained in:
parent
aec9d2cff7
commit
17307ee88d
|
@ -1001,14 +1001,14 @@ public class DFSAdmin extends FsShell {
|
||||||
|
|
||||||
private void printOpenFiles(RemoteIterator<OpenFileEntry> openFilesIterator)
|
private void printOpenFiles(RemoteIterator<OpenFileEntry> openFilesIterator)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
System.out.println(String.format("%-20s\t%-20s\t%s", "Client Host",
|
System.out.printf("%-20s\t%-20s\t%s%n", "Client Host",
|
||||||
"Client Name", "Open File Path"));
|
"Client Name", "Open File Path");
|
||||||
while (openFilesIterator.hasNext()) {
|
while (openFilesIterator.hasNext()) {
|
||||||
OpenFileEntry openFileEntry = openFilesIterator.next();
|
OpenFileEntry openFileEntry = openFilesIterator.next();
|
||||||
System.out.println(String.format("%-20s\t%-20s\t%20s",
|
System.out.printf("%-20s\t%-20s\t%20s%n",
|
||||||
openFileEntry.getClientMachine(),
|
openFileEntry.getClientMachine(),
|
||||||
openFileEntry.getClientName(),
|
openFileEntry.getClientName(),
|
||||||
openFileEntry.getFilePath()));
|
openFileEntry.getFilePath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue