ableegoldman commented on code in PR #14139:
URL: https://github.com/apache/kafka/pull/14139#discussion_r1282600984


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/TaskAssignor.java:
##########
@@ -16,18 +16,29 @@
  */
 package org.apache.kafka.streams.processor.internals.assignment;
 
+import java.util.Optional;
+import org.apache.kafka.common.Cluster;
+import org.apache.kafka.common.TopicPartition;
 import org.apache.kafka.streams.processor.TaskId;
 
 import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
+import org.apache.kafka.streams.processor.internals.InternalTopicManager;
+import 
org.apache.kafka.streams.processor.internals.TopologyMetadata.Subtopology;
 
 public interface TaskAssignor {
     /**
      * @return whether the generated assignment requires a followup probing 
rebalance to satisfy all conditions
      */
-    boolean assign(Map<UUID, ClientState> clients,
-                   Set<TaskId> allTaskIds,
-                   Set<TaskId> statefulTaskIds,
-                   AssignorConfiguration.AssignmentConfigs configs);
+    boolean assign(final Map<UUID, ClientState> clients,
+                   final Set<TaskId> allTaskIds,
+                   final Set<TaskId> statefulTaskIds,
+                   final Cluster cluster,
+                   final Map<TaskId, Set<TopicPartition>> partitionsForTask,
+                   final Map<TaskId, Set<TopicPartition>> 
changelogPartitionsForTask,
+                   final Map<Subtopology, Set<TaskId>> tasksForTopicGroup,
+                   final Map<UUID, Map<String, Optional<String>>> 
racksForProcessConsumer,
+                   final InternalTopicManager internalTopicManager,

Review Comment:
   If we're adding all these things just for the rack-aware assignor, why not 
just construct the RackAwareTaskAssignor separately and then pass that in 
instead?
   
   I know it's not a public API but I'd rather not be passing in a million 
things like this. (Of course, we actually are planning to make it a public API 
sometime soon, so another motivation is to avoid having to back all of this out 
just to wrap it up in something anyways. So may as well do that now)



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

Reply via email to