hanishakoneru commented on a change in pull request #1586: HDDS-2240. Command 
line tool for OM HA.
URL: https://github.com/apache/hadoop/pull/1586#discussion_r334290807
 
 

 ##########
 File path: hadoop-ozone/common/src/main/proto/OzoneManagerProtocol.proto
 ##########
 @@ -1097,11 +1097,34 @@ message UpdateGetS3SecretRequest {
     required string awsSecret = 2;
 }
 
+message OMServiceId {
+    required string serviceID = 1;
+}
+
+/**
+  This proto is used to define the OM node Id and its ratis server state.
+*/
+message RoleInfo {
+    required string omNodeID = 1;
+    required string ratisServerRole = 2;
+}
+
+/**
+  This is used to get the Server States of OMs.
+*/
+message ServiceState {
+    repeated RoleInfo roleInfos = 1;
+}
+
 /**
  The OM service that takes care of Ozone namespace.
 */
 service OzoneManagerService {
     // A client-to-OM RPC to send client requests to OM Ratis server
     rpc submitRequest(OMRequest)
           returns(OMResponse);
+
+    // A client-to-OM RPC to get ratis server states of OMs
+    rpc getServiceState(OMServiceId)
+          returns(ServiceState);
 }
 
 Review comment:
   Clients do not need this information. 
   I have added a new OMRequest to get the OM server roles. Did not add it to 
getServiceList api because getServiceList is called when creating RpcClient (so 
all clients make this call when starting up). But adding the server roles also 
to this api would mean one extra Ratis call to get the server roles which is 
not required by all clients. Hence, kept the two calls separate.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to