You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by zh...@apache.org on 2024/01/13 12:45:09 UTC
(hadoop) branch trunk updated: HDFS-17291. DataNode metric bytesWritten is not totally accurate in some situations. (#6360). Contributed by farmmamba.
This is an automated email from the ASF dual-hosted git repository.
zhangshuyan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new a30681077b8c HDFS-17291. DataNode metric bytesWritten is not totally accurate in some situations. (#6360). Contributed by farmmamba.
a30681077b8c is described below
commit a30681077b8c924954b6c46755370d110aeeda12
Author: hfutatzhanghb <hf...@163.com>
AuthorDate: Sat Jan 13 20:45:00 2024 +0800
HDFS-17291. DataNode metric bytesWritten is not totally accurate in some situations. (#6360). Contributed by farmmamba.
Reviewed-by: huangzhaobo <hu...@126.com>
Signed-off-by: Shuyan Zhang <zh...@apache.org>
---
.../main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 86ee6bd431ef..38b03f8d6a24 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
@@ -842,7 +842,7 @@ class BlockReceiver implements Closeable {
replicaInfo.setLastChecksumAndDataLen(offsetInBlock, lastCrc);
- datanode.metrics.incrBytesWritten(len);
+ datanode.metrics.incrBytesWritten(numBytesToDisk);
datanode.metrics.incrTotalWriteTime(duration);
manageWriterOsCache(offsetInBlock, seqno);
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org