Revert "HDFS-9210. Fix some misuse of %n in VolumeScanner#printStats. Contributed by Xiaoyu Yao."

This reverts commit c1f68b3cd9.
This commit is contained in:
Xiaoyu Yao 2015-10-14 14:42:02 -07:00
parent c1f68b3cd9
commit 88e67a9583
2 changed files with 4 additions and 5 deletions

View File

@ -1234,8 +1234,6 @@ Release 2.8.0 - UNRELEASED
HDFS-9187. Fix null pointer error in Globber when FS was not constructed HDFS-9187. Fix null pointer error in Globber when FS was not constructed
via FileSystem#createFileSystem (cmccabe) via FileSystem#createFileSystem (cmccabe)
HDFS-9210. Fix some misuse of %n in VolumeScanner#printStats. (xyao)
Release 2.7.2 - UNRELEASED Release 2.7.2 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -216,8 +216,9 @@ public class VolumeScanner extends Thread {
} }
public void printStats(StringBuilder p) { public void printStats(StringBuilder p) {
p.append(String.format("Block scanner information for volume %s with base" + p.append("Block scanner information for volume " +
" path %s%n" + volume.getStorageID(), volume.getBasePath())); volume.getStorageID() + " with base path " + volume.getBasePath() +
"%n");
synchronized (stats) { synchronized (stats) {
p.append(String.format("Bytes verified in last hour : %57d%n", p.append(String.format("Bytes verified in last hour : %57d%n",
stats.bytesScannedInPastHour)); stats.bytesScannedInPastHour));
@ -244,7 +245,7 @@ public class VolumeScanner extends Thread {
stats.lastBlockScanned.toString()))); stats.lastBlockScanned.toString())));
p.append(String.format("More blocks to scan in period : %57s%n", p.append(String.format("More blocks to scan in period : %57s%n",
!stats.eof)); !stats.eof));
p.append(String.format("%n")); p.append("%n");
} }
} }