hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From inigo...@apache.org
Subject [6/9] hadoop git commit: HDFS-11547. Add logs for slow BlockReceiver while writing data to disk. Contributed by Xiaobing Zhou.
Date Mon, 20 Mar 2017 18:45:18 GMT
HDFS-11547. Add logs for slow BlockReceiver while writing data to disk. Contributed by Xiaobing
Zhou.


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

Branch: refs/heads/HDFS-10467
Commit: ffa160ddb824cbcb8ab6b10ee1414507686e3c63
Parents: e1a9980
Author: Arpit Agarwal <arp@apache.org>
Authored: Fri Mar 17 19:02:24 2017 -0700
Committer: Arpit Agarwal <arp@apache.org>
Committed: Fri Mar 17 19:02:24 2017 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java    | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ffa160dd/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
index 5852403a..bb6bd55 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
@@ -711,6 +711,10 @@ class BlockReceiver implements Closeable {
           streams.writeDataToDisk(dataBuf.array(),
               startByteToDisk, numBytesToDisk);
           long duration = Time.monotonicNow() - begin;
+          if (duration > datanodeSlowLogThresholdMs) {
+            LOG.warn("Slow BlockReceiver write data to disk cost:" + duration
+                + "ms (threshold=" + datanodeSlowLogThresholdMs + "ms)");
+          }
 
           if (duration > maxWriteToDiskMs) {
             maxWriteToDiskMs = duration;


---------------------------------------------------------------------
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