jianghuazhu commented on code in PR #7025:
URL: https://github.com/apache/ozone/pull/7025#discussion_r1704380319
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/node/NodeStateManager.java:
##########
@@ -501,6 +518,26 @@ public List<DatanodeInfo> getNodes(
return nodeStateMap.getDatanodeInfos(opState, health);
}
+ public List<DatanodeInfo> getVolumeFailuresNodes() {
+ List<DatanodeInfo> allNodes = nodeStateMap.getAllDatanodeInfos();
+ if (allNodes.size() < 1) {
+ return allNodes;
+ }
+
+ List<DatanodeInfo> failedVolumeNodes = new ArrayList<>();
+ for (DatanodeInfo dn : allNodes) {
+ if (dn.getFailedVolumeCount() > 0) {
+ failedVolumeNodes.add(dn);
+ }
+ }
+
+ return failedVolumeNodes;
+ }
+
+ public int getVolumeFailuresNodeCount() {
Review Comment:
Thanks @ivandika3 for the comment and review.
I have updated it.
--
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]