HDFS-15895 : Remove redundant String#format in DFSAdmin#printOpenFiles (#2772)
This commit is contained in:
parent
9ba60c33d8
commit
9c43b60348
@ -1024,14 +1024,14 @@ public int listOpenFiles(String[] argv) throws IOException {
|
|||||||
|
|
||||||
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
Block a user