Hexiaoqiao commented on code in PR #5510:
URL: https://github.com/apache/hadoop/pull/5510#discussion_r1147515572
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java:
##########
@@ -4020,12 +4014,22 @@ public void setReplication(
}
}
+ private void processExtraRedundancyBlock(final BlockInfo block,
Review Comment:
Suggest to add some java doc for this new method.
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java:
##########
@@ -4035,17 +4039,17 @@ private void processExtraRedundancyBlock(final
BlockInfo block,
Collection<DatanodeStorageInfo> nonExcess = new ArrayList<>();
Collection<DatanodeDescriptor> corruptNodes = corruptReplicas
.getNodes(block);
+ boolean hasStaleStorage = false;
+ DatanodeStorageInfo staleStorage = null;
Review Comment:
this should be one set about `DatanodeStorageInfo` because it could be more
than one stale storage here.
##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java:
##########
@@ -4020,12 +4014,22 @@ public void setReplication(
}
}
+ private void processExtraRedundancyBlock(final BlockInfo block,
+ final short replication, final DatanodeDescriptor addedNode,
+ DatanodeDescriptor delNodeHint) {
+ if (!processExtraRedundancyBlockWithoutPostpone(block, replication,
+ addedNode, delNodeHint)) {
+ postponeBlock(block);
+ }
+ }
+
/**
* Find how many of the containing nodes are "extra", if any.
* If there are any extras, call chooseExcessRedundancies() to
* mark them in the excessRedundancyMap.
+ * @return if all redundancy replicas are removed
Review Comment:
`@return if all redundancy replicas are removed`
->
`@return true if all redundancy replicas are removed.`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]