hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aajis...@apache.org
Subject hadoop git commit: HDFS-11140. Directory Scanner should log startup message time correctly. Contributed by Yiqun Lin.
Date Thu, 08 Dec 2016 04:42:12 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 5b44b0c9e -> 59b0857c6


HDFS-11140. Directory Scanner should log startup message time correctly. Contributed by Yiqun
Lin.

(cherry picked from commit 9ef89ede2f18c76c601fd585cb9d47511f5fc3ed)
(cherry picked from commit e00a124cb5c43e34674faa8b450254074b7fd3a6)


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

Branch: refs/heads/branch-2.8
Commit: 59b0857c6b10e5d031457e354054dfc8ea715e06
Parents: 5b44b0c
Author: Akira Ajisaka <aajisaka@apache.org>
Authored: Thu Dec 8 13:38:02 2016 +0900
Committer: Akira Ajisaka <aajisaka@apache.org>
Committed: Thu Dec 8 13:42:02 2016 +0900

----------------------------------------------------------------------
 .../hadoop/hdfs/server/datanode/DirectoryScanner.java    | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/59b0857c/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
index a050452..490321e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
@@ -39,6 +39,7 @@ import java.util.concurrent.atomic.AtomicLong;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.commons.lang.time.FastDateFormat;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.classification.InterfaceAudience;
@@ -64,7 +65,7 @@ public class DirectoryScanner implements Runnable {
   private static final int MILLIS_PER_SECOND = 1000;
   private static final String START_MESSAGE =
       "Periodic Directory Tree Verification scan"
-      + " starting at %dms with interval of %dms";
+      + " starting at %s with interval of %dms";
   private static final String START_MESSAGE_WITH_THROTTLE = START_MESSAGE
       + " and throttle limit of %dms/s";
 
@@ -463,10 +464,12 @@ public class DirectoryScanner implements Runnable {
     String logMsg;
 
     if (throttleLimitMsPerSec < MILLIS_PER_SECOND) {
-      logMsg = String.format(START_MESSAGE_WITH_THROTTLE, firstScanTime,
-          scanPeriodMsecs, throttleLimitMsPerSec);
+      logMsg = String.format(START_MESSAGE_WITH_THROTTLE,
+          FastDateFormat.getInstance().format(firstScanTime), scanPeriodMsecs,
+          throttleLimitMsPerSec);
     } else {
-      logMsg = String.format(START_MESSAGE, firstScanTime, scanPeriodMsecs);
+      logMsg = String.format(START_MESSAGE,
+          FastDateFormat.getInstance().format(firstScanTime), scanPeriodMsecs);
     }
 
     LOG.info(logMsg);


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message