KevinWikant commented on a change in pull request #3675:
URL: https://github.com/apache/hadoop/pull/3675#discussion_r762078547
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminBackoffMonitor.java
##########
@@ -189,6 +190,30 @@ public void run() {
* node will be removed from tracking by the pending cancel.
*/
processCancelledNodes();
+
+ // Having more nodes decommissioning than can be tracked will impact
decommissioning
+ // performance due to queueing delay
+ int numTrackedNodes = outOfServiceNodeBlocks.size();
+ int numQueuedNodes = getPendingNodes().size();
+ int numDecommissioningNodes = numTrackedNodes + numQueuedNodes;
+ if (numDecommissioningNodes > maxConcurrentTrackedNodes) {
+ LOG.warn(
+ "There are {} nodes decommissioning but only {} nodes will be
tracked at a time. "
+ + "{} nodes are currently queued waiting to be
decommissioned.",
+ numDecommissioningNodes, maxConcurrentTrackedNodes,
numQueuedNodes);
+
+ // Re-queue unhealthy nodes to make space for decommissioning
healthy nodes
+ final List<DatanodeDescriptor> unhealthyDns =
outOfServiceNodeBlocks.keySet().stream()
+ .filter(dn ->
!blockManager.isNodeHealthyForDecommissionOrMaintenance(dn))
+ .collect(Collectors.toList());
+ final List<DatanodeDescriptor> toRequeue =
+ identifyUnhealthyNodesToRequeue(unhealthyDns,
numDecommissioningNodes);
+ for (DatanodeDescriptor dn : toRequeue) {
+ getPendingNodes().add(dn);
+ outOfServiceNodeBlocks.remove(dn);
Review comment:
I think I may also need to remove from "pendingRep" here
--
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]