jojochuang commented on code in PR #4332:
URL: https://github.com/apache/hadoop/pull/4332#discussion_r877643028


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeAdminManager.java:
##########
@@ -255,6 +255,15 @@ public void startMaintenance(DatanodeDescriptor node,
    */
   @VisibleForTesting
   public void stopMaintenance(DatanodeDescriptor node) {
+    boolean shouldStopTracking = node.isMaintenance();
+    stopMaintenanceInternal(node);
+    if (shouldStopTracking) {
+      // Remove from tracking in DatanodeAdminManager
+      monitor.stopTrackingNode(node);
+    }
+  }
+
+  protected void stopMaintenanceInternal(DatanodeDescriptor node) {

Review Comment:
   would be great to add comments or make the method name more self-explanatory.



-- 
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]

Reply via email to