You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by "xianjingfeng (via GitHub)" <gi...@apache.org> on 2023/02/27 07:02:05 UTC

[GitHub] [incubator-uniffle] xianjingfeng opened a new pull request, #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

xianjingfeng opened a new pull request, #663:
URL: https://github.com/apache/incubator-uniffle/pull/663

   <!--
   1. Title: [#<issue>] <type>(<scope>): <subject>
      Examples:
        - "[#123] feat(operator): support xxx"
        - "[#233] fix: check null before access result in xxx"
        - "[MINOR] refactor: fix typo in variable name"
        - "[MINOR] docs: fix typo in README"
        - "[#255] test: fix flaky test NameOfTheTest"
      Reference: https://www.conventionalcommits.org/en/v1.0.0/
   2. Contributor guidelines:
      https://github.com/apache/incubator-uniffle/blob/master/CONTRIBUTING.md
   3. If the PR is unfinished, please mark this PR as draft.
   -->
   
   ### What changes were proposed in this pull request?
   
   Add RPC logic and heartbeat logic for decommisson
   
   ### Why are the changes needed?
   
   Support shuffle server decommission. It is a part of #80
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   ### How was this patch tested?
   
   UT
   


-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121265651


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   > It's ok for me too.
   
   Let us use `cancel` to replace `on`. `On` don't give me enough information.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121061662


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   Why do we need to cancel decomission? Is there for other systems the function?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1119679106


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   Could you give this configuration option a better name?



##########
proto/src/main/proto/Rss.proto:
##########
@@ -458,3 +467,17 @@ message FetchRemoteStorageResponse {
   StatusCode status = 1;
   RemoteStorage remoteStorage = 2;
 }
+
+service ShuffleServerInternal {
+  rpc decommission(DecommissionRequest) returns (DecommissionResponse);
+}
+
+message DecommissionRequest {
+  google.protobuf.BoolValue on = 1;
+}
+
+message DecommissionResponse {
+  StatusCode status = 1;
+  google.protobuf.BoolValue on = 2;
+  string retMsg = 3;
+}

Review Comment:
   Add new line.



##########
proto/src/main/proto/Rss.proto:
##########
@@ -234,6 +234,13 @@ message ShuffleCommitResponse {
   string retMsg = 3;
 }
 
+enum ServerStatus {
+  ACTIVE = 0;

Review Comment:
   OK.



##########
proto/src/main/proto/Rss.proto:
##########
@@ -242,6 +249,7 @@ message ShuffleServerHeartBeatRequest {
   int32 eventNumInFlush = 5;
   repeated string tags = 6;
   google.protobuf.BoolValue isHealthy = 7;
+  ServerStatus status = 8;

Review Comment:
   Is this a compatible feature? Can the new coordinator receive old shuffle server's heartbeat request?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1119705852


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   This class will be used in both decommission and cancel decommission.  `on=true` means decommission and `on=false` means cancel decommission.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] advancedxy commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "advancedxy (via GitHub)" <gi...@apache.org>.
advancedxy commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1123134037


##########
common/src/test/java/org/apache/uniffle/common/ServerStatusTest.java:
##########
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.common;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.junit.jupiter.api.Test;
+
+import org.apache.uniffle.proto.RssProtos;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.fail;
+
+public class ServerStatusTest {
+
+  @Test
+  public void test() throws Exception {
+    assertEquals(-1, ServerStatus.UNKNOWN.code());
+    assertEquals(ServerStatus.fromCode(-2), ServerStatus.UNKNOWN);
+    assertEquals(ServerStatus.fromCode(Integer.MAX_VALUE), ServerStatus.UNKNOWN);
+    List<RssProtos.ServerStatus> protoServerStatuses = Arrays.stream(RssProtos.ServerStatus.values())
+        .filter(s -> !RssProtos.ServerStatus.UNRECOGNIZED.equals(s)).collect(Collectors.toList());
+
+    for (RssProtos.ServerStatus statusCode : protoServerStatuses) {
+
+      try {
+        ServerStatus.valueOf(statusCode.name());
+      } catch (Exception e) {
+        fail(e.getMessage());
+      }
+    }
+    List<ServerStatus> serverStatuses = Arrays.stream(ServerStatus.values())
+        .filter(s -> !ServerStatus.UNKNOWN.equals(s)).collect(Collectors.toList());
+    for (ServerStatus serverStatus : serverStatuses) {
+      try {
+        RssProtos.ServerStatus.valueOf(serverStatus.name());
+      } catch (Exception e) {
+        fail(e.getMessage());
+      }
+    }
+    for (int i = 0; i < serverStatuses.size() - 1; i++) {

Review Comment:
   ditto.. You may open a follow up pr for this.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1119694607


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   I have not good idea.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] advancedxy commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "advancedxy (via GitHub)" <gi...@apache.org>.
advancedxy commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121939924


##########
common/src/main/java/org/apache/uniffle/common/ServerStatus.java:
##########
@@ -17,12 +17,20 @@
 
 package org.apache.uniffle.common;
 
+import java.util.Arrays;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.apache.uniffle.proto.RssProtos;
+
 public enum ServerStatus {
-  UNKNOWN(-1),
   ACTIVE(0),
   DECOMMISSIONING(1),
-  DECOMMISSIONED(2);
+  DECOMMISSIONED(2),
+  UNKNOWN(-1); // UNKNOWN should be the last element of this enum, or unit test will fail.

Review Comment:
   I prefer to modify the UT then?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121293160


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121721342


##########
coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java:
##########
@@ -54,6 +58,7 @@ public class SimpleClusterManager implements ClusterManager {
   private static final Logger LOG = LoggerFactory.getLogger(SimpleClusterManager.class);
 
   private final Map<String, ServerNode> servers = Maps.newConcurrentMap();
+  private Map<ServerNode, ShuffleServerInternalGrpcClient> serverClientMap = Maps.newConcurrentMap();

Review Comment:
   Updated



##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean cancel;
+
+  public boolean isCancel() {
+    return cancel;
+  }
+
+  public RssDecommissionRequest(boolean cancel) {
+    this.cancel = cancel;

Review Comment:
   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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#issuecomment-1451868049

   Thanks @jerqi @advancedxy 


-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1119706745


##########
proto/src/main/proto/Rss.proto:
##########
@@ -242,6 +249,7 @@ message ShuffleServerHeartBeatRequest {
   int32 eventNumInFlush = 5;
   repeated string tags = 6;
   google.protobuf.BoolValue isHealthy = 7;
+  ServerStatus status = 8;

Review Comment:
   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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121205566


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   > I didn't see it in the HDFS. HDFS's decomission api is called `refreshNodes`.
   
   Yes, we add datanode to `exclude-file` and then `refreshNodes` if we need to decomission it . And we remove it from `exclude-file` and then `refreshNodes` if we need to cancel decomission 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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121199823


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   I didn't see it in the HDFS. HDFS's decomission api is called `refreshNodes`.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121621336


##########
coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java:
##########
@@ -54,6 +58,7 @@ public class SimpleClusterManager implements ClusterManager {
   private static final Logger LOG = LoggerFactory.getLogger(SimpleClusterManager.class);
 
   private final Map<String, ServerNode> servers = Maps.newConcurrentMap();
+  private Map<ServerNode, ShuffleServerInternalGrpcClient> serverClientMap = Maps.newConcurrentMap();

Review Comment:
   Like Guava Cache.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng merged pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng merged PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663


-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] codecov-commenter commented on pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#issuecomment-1447763670

   # [Codecov](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#663](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (bec6d53) into [master](https://codecov.io/gh/apache/incubator-uniffle/commit/c70d1543e7c9ca774e986026890763ce949a10e5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c70d154) will **increase** coverage by `1.02%`.
   > The diff coverage is `31.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master     #663      +/-   ##
   ============================================
   + Coverage     60.67%   61.70%   +1.02%     
   + Complexity     1802     1724      -78     
   ============================================
     Files           216      194      -22     
     Lines         12458    10030    -2428     
     Branches       1052     1019      -33     
   ============================================
   - Hits           7559     6189    -1370     
   + Misses         4494     3506     -988     
   + Partials        405      335      -70     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...java/org/apache/uniffle/common/rpc/GrpcServer.java](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL2NvbW1vbi9ycGMvR3JwY1NlcnZlci5qYXZh) | `21.53% <0.00%> (-3.92%)` | :arrow_down: |
   | [...he/uniffle/coordinator/CoordinatorGrpcService.java](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29vcmRpbmF0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3VuaWZmbGUvY29vcmRpbmF0b3IvQ29vcmRpbmF0b3JHcnBjU2VydmljZS5qYXZh) | `2.07% <0.00%> (-0.02%)` | :arrow_down: |
   | [...a/org/apache/uniffle/server/RegisterHeartBeat.java](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL3NlcnZlci9SZWdpc3RlckhlYXJ0QmVhdC5qYXZh) | `43.10% <0.00%> (-0.76%)` | :arrow_down: |
   | [...ache/uniffle/coordinator/SimpleClusterManager.java](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29vcmRpbmF0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3VuaWZmbGUvY29vcmRpbmF0b3IvU2ltcGxlQ2x1c3Rlck1hbmFnZXIuamF2YQ==) | `74.34% <11.11%> (-8.50%)` | :arrow_down: |
   | [...iffle/server/ShuffleServerInternalGrpcService.java](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL3NlcnZlci9TaHVmZmxlU2VydmVySW50ZXJuYWxHcnBjU2VydmljZS5qYXZh) | `12.50% <12.50%> (ø)` | |
   | [...ava/org/apache/uniffle/coordinator/ServerNode.java](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29vcmRpbmF0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3VuaWZmbGUvY29vcmRpbmF0b3IvU2VydmVyTm9kZS5qYXZh) | `81.25% <50.00%> (-4.80%)` | :arrow_down: |
   | [...n/java/org/apache/uniffle/common/ServerStatus.java](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL2NvbW1vbi9TZXJ2ZXJTdGF0dXMuamF2YQ==) | `100.00% <100.00%> (+100.00%)` | :arrow_up: |
   | [...java/org/apache/uniffle/common/rpc/StatusCode.java](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL2NvbW1vbi9ycGMvU3RhdHVzQ29kZS5qYXZh) | `95.23% <100.00%> (+1.48%)` | :arrow_up: |
   | [...apache/uniffle/coordinator/CoordinatorFactory.java](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29vcmRpbmF0b3Ivc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3VuaWZmbGUvY29vcmRpbmF0b3IvQ29vcmRpbmF0b3JGYWN0b3J5LmphdmE=) | `84.61% <100.00%> (+2.79%)` | :arrow_up: |
   | [...rg/apache/uniffle/server/ShuffleServerFactory.java](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS91bmlmZmxlL3NlcnZlci9TaHVmZmxlU2VydmVyRmFjdG9yeS5qYXZh) | `76.47% <100.00%> (+7.23%)` | :arrow_up: |
   | ... and [30 more](https://codecov.io/gh/apache/incubator-uniffle/pull/663?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1119765944


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   It is OK for me.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121060309


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   It's a little tricky to control decomission and cancel of decomission with `on`.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121618935


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean cancel;
+
+  public boolean isCancel() {
+    return cancel;
+  }
+
+  public RssDecommissionRequest(boolean cancel) {
+    this.cancel = cancel;

Review Comment:
   It is ok for me. WDYT? @jerqi 



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1119696191


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   What's the meaning of this variable?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121249691


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   It's ok for me too.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1118580201


##########
proto/src/main/proto/Rss.proto:
##########
@@ -234,6 +234,13 @@ message ShuffleCommitResponse {
   string retMsg = 3;
 }
 
+enum ServerStatus {
+  ACTIVE = 0;

Review Comment:
   Should we add `UNKNOWN` for this enum?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121620393


##########
coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java:
##########
@@ -54,6 +58,7 @@ public class SimpleClusterManager implements ClusterManager {
   private static final Logger LOG = LoggerFactory.getLogger(SimpleClusterManager.class);
 
   private final Map<String, ServerNode> servers = Maps.newConcurrentMap();
+  private Map<ServerNode, ShuffleServerInternalGrpcClient> serverClientMap = Maps.newConcurrentMap();

Review Comment:
   Maybe cache with timeout is better?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] advancedxy commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "advancedxy (via GitHub)" <gi...@apache.org>.
advancedxy commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1123132630


##########
common/src/test/java/org/apache/uniffle/common/rpc/StatusCodeTest.java:
##########
@@ -28,27 +32,32 @@ public class StatusCodeTest {
 
   @Test
   public void test() throws Exception {
-    RssProtos.StatusCode[] protoStatusCode = RssProtos.StatusCode.values();
+    assertEquals(-1, StatusCode.UNKNOWN.statusCode());
+    assertEquals(StatusCode.fromCode(-2), StatusCode.UNKNOWN);
+    assertEquals(StatusCode.fromCode(Integer.MAX_VALUE), StatusCode.UNKNOWN);
+    List<RssProtos.StatusCode> protoStatusCode = Arrays.stream(RssProtos.StatusCode.values())
+        .filter(s -> !RssProtos.StatusCode.UNRECOGNIZED.equals(s)).collect(Collectors.toList());
+
     for (RssProtos.StatusCode statusCode : protoStatusCode) {
       try {
-        if (RssProtos.StatusCode.UNRECOGNIZED.equals(statusCode)) {
-          continue;
-        }
         StatusCode.valueOf(statusCode.name());
       } catch (Exception e) {
         fail(e.getMessage());
       }
     }
-    StatusCode[] statusCodes = StatusCode.values();
+    List<StatusCode> statusCodes = Arrays.stream(StatusCode.values())
+        .filter(s -> !StatusCode.UNKNOWN.equals(s)).collect(Collectors.toList());
+
     for (StatusCode statusCode : statusCodes) {
       try {
         RssProtos.StatusCode.valueOf(statusCode.name());
       } catch (Exception e) {
         fail(e.getMessage());
       }
     }
-    for (int i = 0; i < statusCodes.length; i++) {
-      assertEquals(protoStatusCode[i], statusCodes[i].toProto());
+    for (int i = 0; i < statusCodes.size() - 1; i++) {

Review Comment:
   this should be restored to the original code since UNKNOWN has already been filtered out.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121621438


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean cancel;
+
+  public boolean isCancel() {
+    return cancel;
+  }
+
+  public RssDecommissionRequest(boolean cancel) {
+    this.cancel = cancel;

Review Comment:
   OK for me.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1119711204


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   Should we separate it to two rpc methods?



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] advancedxy commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "advancedxy (via GitHub)" <gi...@apache.org>.
advancedxy commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121406932


##########
common/src/main/java/org/apache/uniffle/common/ServerStatus.java:
##########
@@ -17,12 +17,20 @@
 
 package org.apache.uniffle.common;
 
+import java.util.Arrays;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.apache.uniffle.proto.RssProtos;
+
 public enum ServerStatus {
-  UNKNOWN(-1),
   ACTIVE(0),
   DECOMMISSIONING(1),
-  DECOMMISSIONED(2);
+  DECOMMISSIONED(2),
+  UNKNOWN(-1); // UNKNOWN should be the last element of this enum, or unit test will fail.

Review Comment:
   Do you have any idea why this would happen? It doesn't make sense to me that UNKNOWN should be the last element.



##########
common/src/main/java/org/apache/uniffle/common/ServerStatus.java:
##########
@@ -32,4 +40,16 @@ public enum ServerStatus {
   public int code() {
     return code;
   }
+
+  public static ServerStatus fromCode(Integer code) {

Review Comment:
   do you think we would return `UNKNOWN` for `code >= 3 or code < -1 `?



##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean cancel;
+
+  public boolean isCancel() {
+    return cancel;
+  }
+
+  public RssDecommissionRequest(boolean cancel) {
+    this.cancel = cancel;

Review Comment:
   is it better to add two requests:
   `RssDecommissionRequest` and `RssCancelDecommissionRequest`?
   
   This looks like a bit weird..



##########
coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java:
##########
@@ -54,6 +58,7 @@ public class SimpleClusterManager implements ClusterManager {
   private static final Logger LOG = LoggerFactory.getLogger(SimpleClusterManager.class);
 
   private final Map<String, ServerNode> servers = Maps.newConcurrentMap();
+  private Map<ServerNode, ShuffleServerInternalGrpcClient> serverClientMap = Maps.newConcurrentMap();

Review Comment:
   I prefer to use a client cache with maximum client entry here, rather keep all the rss clients in the memory.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121615806


##########
common/src/main/java/org/apache/uniffle/common/ServerStatus.java:
##########
@@ -17,12 +17,20 @@
 
 package org.apache.uniffle.common;
 
+import java.util.Arrays;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.apache.uniffle.proto.RssProtos;
+
 public enum ServerStatus {
-  UNKNOWN(-1),
   ACTIVE(0),
   DECOMMISSIONING(1),
-  DECOMMISSIONED(2);
+  DECOMMISSIONED(2),
+  UNKNOWN(-1); // UNKNOWN should be the last element of this enum, or unit test will fail.

Review Comment:
   Just for ut
   https://github.com/apache/incubator-uniffle/blob/4738a51e19e2691000489f629c9ce02d35b3047e/common/src/test/java/org/apache/uniffle/common/ServerStatusTest.java#L54-L57



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "jerqi (via GitHub)" <gi...@apache.org>.
jerqi commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121217824


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   Maybe it's better that we change `on` to `cancel`.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] advancedxy commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "advancedxy (via GitHub)" <gi...@apache.org>.
advancedxy commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121928144


##########
coordinator/src/main/java/org/apache/uniffle/coordinator/SimpleClusterManager.java:
##########
@@ -54,6 +58,7 @@ public class SimpleClusterManager implements ClusterManager {
   private static final Logger LOG = LoggerFactory.getLogger(SimpleClusterManager.class);
 
   private final Map<String, ServerNode> servers = Maps.newConcurrentMap();
+  private Map<ServerNode, ShuffleServerInternalGrpcClient> serverClientMap = Maps.newConcurrentMap();

Review Comment:
   > Like Guava Cache.
   
   yes, guava cache, with ttl + capacity.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1124376817


##########
common/src/test/java/org/apache/uniffle/common/rpc/StatusCodeTest.java:
##########
@@ -28,27 +32,32 @@ public class StatusCodeTest {
 
   @Test
   public void test() throws Exception {
-    RssProtos.StatusCode[] protoStatusCode = RssProtos.StatusCode.values();
+    assertEquals(-1, StatusCode.UNKNOWN.statusCode());
+    assertEquals(StatusCode.fromCode(-2), StatusCode.UNKNOWN);
+    assertEquals(StatusCode.fromCode(Integer.MAX_VALUE), StatusCode.UNKNOWN);
+    List<RssProtos.StatusCode> protoStatusCode = Arrays.stream(RssProtos.StatusCode.values())
+        .filter(s -> !RssProtos.StatusCode.UNRECOGNIZED.equals(s)).collect(Collectors.toList());
+
     for (RssProtos.StatusCode statusCode : protoStatusCode) {
       try {
-        if (RssProtos.StatusCode.UNRECOGNIZED.equals(statusCode)) {
-          continue;
-        }
         StatusCode.valueOf(statusCode.name());
       } catch (Exception e) {
         fail(e.getMessage());
       }
     }
-    StatusCode[] statusCodes = StatusCode.values();
+    List<StatusCode> statusCodes = Arrays.stream(StatusCode.values())
+        .filter(s -> !StatusCode.UNKNOWN.equals(s)).collect(Collectors.toList());
+
     for (StatusCode statusCode : statusCodes) {
       try {
         RssProtos.StatusCode.valueOf(statusCode.name());
       } catch (Exception e) {
         fail(e.getMessage());
       }
     }
-    for (int i = 0; i < statusCodes.length; i++) {
-      assertEquals(protoStatusCode[i], statusCodes[i].toProto());
+    for (int i = 0; i < statusCodes.size() - 1; i++) {

Review Comment:
   Get. I will fix it in next pr of this feature.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1119497554


##########
proto/src/main/proto/Rss.proto:
##########
@@ -234,6 +234,13 @@ message ShuffleCommitResponse {
   string retMsg = 3;
 }
 
+enum ServerStatus {
+  ACTIVE = 0;

Review Comment:
   Protobuf has a default value named UNRECOGNIZED



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121618189


##########
common/src/main/java/org/apache/uniffle/common/ServerStatus.java:
##########
@@ -32,4 +40,16 @@ public enum ServerStatus {
   public int code() {
     return code;
   }
+
+  public static ServerStatus fromCode(Integer code) {

Review Comment:
   It is ok for me.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org


[GitHub] [incubator-uniffle] xianjingfeng commented on a diff in pull request #663: [#80][Part-2] feat: Add RPC logic and heartbeat logic for decommisson

Posted by "xianjingfeng (via GitHub)" <gi...@apache.org>.
xianjingfeng commented on code in PR #663:
URL: https://github.com/apache/incubator-uniffle/pull/663#discussion_r1121182917


##########
internal-client/src/main/java/org/apache/uniffle/client/request/RssDecommissionRequest.java:
##########
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.uniffle.client.request;
+
+public class RssDecommissionRequest {
+  private boolean on;

Review Comment:
   > Why do we need to cancel decomission? Is there for other systems the function?
   
   This function is required in case of incorrect operation or plan change. HDFS supports cancel decomission too.



-- 
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: issues-unsubscribe@uniffle.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org