This is an automated email from the ASF dual-hosted git repository.
weichiu 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 1c5d2f1 HDFS-15174. Optimize ReplicaCachingGetSpaceUsed by reducing
unnecessary io operations. Contributed by Lisheng Sun.
1c5d2f1 is described below
commit 1c5d2f1fdc40b77731bc13973876b567865888d1
Author: Wei-Chiu Chuang <[email protected]>
AuthorDate: Mon Feb 24 13:37:11 2020 -0800
HDFS-15174. Optimize ReplicaCachingGetSpaceUsed by reducing unnecessary io
operations. Contributed by Lisheng Sun.
---
.../hdfs/server/datanode/fsdataset/impl/ReplicaCachingGetSpaceUsed.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/fsdataset/impl/ReplicaCachingGetSpaceUsed.java
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/ReplicaCachingGetSpaceUsed.java
index d2dc90e..5acc3c0 100644
---
a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/ReplicaCachingGetSpaceUsed.java
+++
b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/ReplicaCachingGetSpaceUsed.java
@@ -86,7 +86,7 @@ public class ReplicaCachingGetSpaceUsed extends
FSCachingGetSpaceUsed {
for (ReplicaInfo replicaInfo : replicaInfos) {
if (Objects.equals(replicaInfo.getVolume().getStorageID(),
volume.getStorageID())) {
- dfsUsed += replicaInfo.getBlockDataLength();
+ dfsUsed += replicaInfo.getBytesOnDisk();
dfsUsed += replicaInfo.getMetadataLength();
count++;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]