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 ar...@apache.org on 2018/02/12 15:17:25 UTC
[2/5] hadoop git commit: HDFS-10453. ReplicationMonitor thread could
stuck for long time due to the race between replication and delete of same
file in a large cluster.. Contributed by He Xiaoqiao.
HDFS-10453. ReplicationMonitor thread could stuck for long time due to the race between replication and delete of same file in a large cluster.. Contributed by He Xiaoqiao.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/834226ba
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/834226ba
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/834226ba
Branch: refs/heads/branch-2.8
Commit: 834226ba237a42e358a7ca6e00793a731b586eae
Parents: f043aa9
Author: Arpit Agarwal <ar...@apache.org>
Authored: Mon Feb 12 07:02:42 2018 -0800
Committer: Arpit Agarwal <ar...@apache.org>
Committed: Mon Feb 12 07:06:55 2018 -0800
----------------------------------------------------------------------
.../hadoop/hdfs/server/blockmanagement/ReplicationWork.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hadoop/blob/834226ba/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/ReplicationWork.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/ReplicationWork.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/ReplicationWork.java
index 8362096..aaf509e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/ReplicationWork.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/ReplicationWork.java
@@ -26,6 +26,7 @@ import java.util.Set;
class ReplicationWork {
private final BlockInfo block;
private final String srcPath;
+ private final long blockSize;
private final byte storagePolicyID;
private final DatanodeDescriptor srcNode;
private final int additionalReplRequired;
@@ -40,6 +41,7 @@ class ReplicationWork {
int priority) {
this.block = block;
this.srcPath = bc.getName();
+ this.blockSize = block.getNumBytes();
this.storagePolicyID = bc.getStoragePolicyID();
this.srcNode = srcNode;
this.srcNode.incrementPendingReplicationWithoutTargets();
@@ -56,7 +58,7 @@ class ReplicationWork {
try {
targets = blockplacement.chooseTarget(getSrcPath(),
additionalReplRequired, srcNode, liveReplicaStorages, false,
- excludedNodes, block.getNumBytes(),
+ excludedNodes, blockSize,
storagePolicySuite.getPolicy(getStoragePolicyID()), null);
} finally {
srcNode.decrementPendingReplicationWithoutTargets();
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org