sreejasahithi commented on code in PR #9611:
URL: https://github.com/apache/ozone/pull/9611#discussion_r2681640796


##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMClientProtocolServer.java:
##########
@@ -1033,6 +1033,24 @@ public Map<String, Pair<Boolean, String>> 
getSafeModeRuleStatuses()
     }
   }
 
+  @Override
+  public boolean inSafeModeForNode(String nodeId) throws IOException {
+    boolean result = inSafeMode();
+    AUDIT.logReadSuccess(
+        buildAuditMessageForSuccess(SCMAction.IN_SAFE_MODE, null)
+    );
+    return result;
+  }
+
+  @Override
+  public Map<String, Pair<Boolean, String>> 
getSafeModeRuleStatusesForNode(String nodeId) throws IOException {
+    Map<String, Pair<Boolean, String>> result = getSafeModeRuleStatuses();
+    AUDIT.logReadSuccess(
+        buildAuditMessageForSuccess(SCMAction.GET_SAFE_MODE_RULE_STATUSES, 
null)
+    );
+    return result;
+  }

Review Comment:
   Your understanding is correct. These methods cannot be reached, but they 
exist because it is required by the StorageContainerLocationProtocol interface 
contract.
   They are never called because client-side translator uses 
submitRequestToNode() which gets a direct proxy to the target SCM and sends a 
regular Type.InSafeMode request.
   The server receives this as a standard InSafeMode request and routes it to 
the existing inSafeMode() method
   The nodeId parameter only exists in the client-side for proxy selection.



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