hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x...@apache.org
Subject hadoop git commit: HDFS-9210. Fix some misuse of %n in VolumeScanner#printStats. Contributed by Xiaoyu Yao.
Date Mon, 01 Feb 2016 19:56:40 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 59a212b6e -> b11008d54


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


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/b11008d5
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/b11008d5
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/b11008d5

Branch: refs/heads/trunk
Commit: b11008d54d8aa3eb9c7c10c3a0734d95b9ef41e9
Parents: 59a212b
Author: Xiaoyu Yao <xyao@apache.org>
Authored: Mon Feb 1 11:55:27 2016 -0800
Committer: Xiaoyu Yao <xyao@apache.org>
Committed: Mon Feb 1 11:55:27 2016 -0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                   | 3 +++
 .../org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java | 7 +++----
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/b11008d5/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index fdf69d9..ee9dcc2b 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -2664,6 +2664,9 @@ Release 2.8.0 - UNRELEASED
     HDFS-9708. FSNamesystem.initAuditLoggers() doesn't trim classnames
     (Mingliang Liu via stevel)
 
+    HDFS-9210. Fix some misuse of %n in VolumeScanner#printStats.
+    (Xiaoyu Yao)
+
 Release 2.7.3 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/b11008d5/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java
index 212e13b..d1f2d05 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/VolumeScanner.java
@@ -216,9 +216,8 @@ public class VolumeScanner extends Thread {
   }
 
   public void printStats(StringBuilder p) {
-    p.append("Block scanner information for volume " +
-        volume.getStorageID() + " with base path " + volume.getBasePath() +
-        "%n");
+    p.append(String.format("Block scanner information for volume %s with base" +
+        " path %s%n", volume.getStorageID(), volume.getBasePath()));
     synchronized (stats) {
       p.append(String.format("Bytes verified in last hour       : %57d%n",
           stats.bytesScannedInPastHour));
@@ -245,7 +244,7 @@ public class VolumeScanner extends Thread {
           stats.lastBlockScanned.toString())));
       p.append(String.format("More blocks to scan in period     : %57s%n",
           !stats.eof));
-      p.append("%n");
+      p.append(System.lineSeparator());
     }
   }
 


Mime
View raw message