HDFS-15895 : Remove redundant String#format in DFSAdmin#printOpenFiles (#2772)

(cherry picked from commit 9c43b60348)
This commit is contained in:
Viraj Jasani 2021-03-17 11:42:36 +05:30 committed by Takanobu Asanuma
parent aec9d2cff7
commit 17307ee88d
1 changed files with 4 additions and 4 deletions

View File

@ -1001,14 +1001,14 @@ public int listOpenFiles(String[] argv) throws IOException {
private void printOpenFiles(RemoteIterator<OpenFileEntry> openFilesIterator)
throws IOException {
System.out.println(String.format("%-20s\t%-20s\t%s", "Client Host",
"Client Name", "Open File Path"));
System.out.printf("%-20s\t%-20s\t%s%n", "Client Host",
"Client Name", "Open File Path");
while (openFilesIterator.hasNext()) {
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.getClientName(),
openFileEntry.getFilePath()));
openFileEntry.getFilePath());
}
}