jerqi commented on code in PR #166:
URL: https://github.com/apache/incubator-uniffle/pull/166#discussion_r949743151


##########
common/src/main/java/org/apache/uniffle/common/config/RssBaseConf.java:
##########
@@ -158,6 +158,12 @@ public class RssBaseConf extends RssConf {
       .defaultValue(true)
       .withDescription("The switch for jvm metrics verbose");
 
+  public static final ConfigOption<String> RSS_SERVER_IP = ConfigOptions

Review Comment:
   Is this config option is only used for test? We already have 
https://github.com/apache/incubator-uniffle/commit/6937631876052425b8d808d26caf78c79b24536a,
 could we use this?



##########
coordinator/src/main/java/org/apache/uniffle/coordinator/AbstractAssignmentStrategy.java:
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.coordinator;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+public abstract class AbstractAssignmentStrategy implements AssignmentStrategy 
{
+  protected List<ServerNode> getCandidateNodes(List<ServerNode> allNodes, int 
expectNum) {

Review Comment:
   For a scheduler, we usually provide an option for users to choose whether to 
allocate on a single node.  Because there are enough nodes to choose sometimes. 
To solve this problems, scheduler usually provide three semantics.
   First, don't consider this factor. When we can assign the servers, we don't 
consider whether there are partitions on the same node.
   Second, prefer considering this factor. When we can assign the servers, we 
try our best to avoid the partitions on the same node. But if we don't have 
enough the servers, we could assign the same node  to the partitions.
   Third, must considering this factor. We must avoid the partitions on the 
same node. If we don't have enough servers, we return the servers directly.
   You don't need to implement the every semantics, but we hope we can 
implement the other semantics easily in the future when there are users which 
need the semantics , so should we need some config options or implement 
abstraction?
   



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