kfaraz commented on code in PR #18634:
URL: https://github.com/apache/druid/pull/18634#discussion_r2431360688


##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/setup/EqualDistributionWithSupervisorCategorySpecWorkerSelectStrategy.java:
##########
@@ -0,0 +1,108 @@
+/*
+ * 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.druid.indexing.overlord.setup;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.google.common.collect.ImmutableMap;
+import org.apache.druid.common.config.Configs;
+import org.apache.druid.indexing.common.task.Task;
+import org.apache.druid.indexing.overlord.ImmutableWorkerInfo;
+import org.apache.druid.indexing.overlord.config.WorkerTaskRunnerConfig;
+
+import javax.annotation.Nullable;
+import java.util.Objects;
+
+public class EqualDistributionWithSupervisorCategorySpecWorkerSelectStrategy 
implements WorkerSelectStrategy

Review Comment:
   This strategy seems to be mostly a duplicate of the existing 
`equalDistributionWithCategorySpec`.
   
   Instead of this, add a new map in `CategoryConfig` class : `Map<String, 
String> supervisorIdCategoryAffinity`.
   We will first check in this map, otherwise fallback to the datasource check.
   This approach is better since there is no ambiguity regarding whether the 
map is keyed by datasource name or supervisor id.
   Also, the `fillCapacityWithCategorySpec` strategy will be able to leverage 
the changes.



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