xyuanlu commented on code in PR #2844:
URL: https://github.com/apache/helix/pull/2844#discussion_r1690626665


##########
helix-gateway/src/main/java/org/apache/helix/gateway/util/StateTransitionMessageTranslateUtil.java:
##########
@@ -1,17 +1,71 @@
 package org.apache.helix.gateway.util;
 
-import org.apache.helix.gateway.service.GatewayServiceManager;
-import 
proto.org.apache.helix.gateway.HelixGatewayServiceOuterClass.TransitionMessage;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.helix.gateway.constant.GatewayServiceEventType;
+import org.apache.helix.gateway.service.GatewayServiceEvent;
+import proto.org.apache.helix.gateway.HelixGatewayServiceOuterClass;
+import proto.org.apache.helix.gateway.HelixGatewayServiceOuterClass.ShardState;
 import 
proto.org.apache.helix.gateway.HelixGatewayServiceOuterClass.ShardStateMessage;
+import 
proto.org.apache.helix.gateway.HelixGatewayServiceOuterClass.ShardTransitionStatus;
+import 
proto.org.apache.helix.gateway.HelixGatewayServiceOuterClass.TransitionMessage;
 
 
 public final class StateTransitionMessageTranslateUtil {
 
-  public static TransitionMessage translateSTMsgToProto() {
+  public static TransitionMessage translateSTMsgToTransitionMessage() {
     return null;
   }
 
-  public static GatewayServiceManager.GateWayServiceEvent 
translateProtoToSTMsg(ShardStateMessage message) {
-    return null;
+  /**
+   * Translate from GRPC function call to Helix Gateway Service event.
+   */
+  public static GatewayServiceEvent 
translateShardStateMessageToEvent(ShardStateMessage request) {
+
+    if (request.hasShardState()) { // init connection to gateway service
+      ShardState shardState = request.getShardState();
+      String instanceName = shardState.getInstanceName();
+      String clusterName = shardState.getClusterName();

Review Comment:
   TFTR. Updated



-- 
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: reviews-unsubscr...@helix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org
For additional commands, e-mail: reviews-h...@helix.apache.org

Reply via email to