mjsax commented on code in PR #14097:
URL: https://github.com/apache/kafka/pull/14097#discussion_r1277015051


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/RackAwareTaskAssignor.java:
##########
@@ -63,11 +62,11 @@ public RackAwareTaskAssignor(final Cluster fullMetadata,
                                  final AssignmentConfigs assignmentConfigs) {
         this.fullMetadata = fullMetadata;
         this.partitionsForTask = partitionsForTask;
-        this.racksForProcessConsumer = racksForProcessConsumer;
         this.internalTopicManager = internalTopicManager;
         this.assignmentConfigs = assignmentConfigs;
         this.racksForPartition = new HashMap<>();
         this.racksForProcess = new HashMap<>();
+        validateClientRack(racksForProcessConsumer);

Review Comment:
   I think we should document that we might throw here, because when we create 
` RackAwareTaskAssignor` we need to catch this exception to ensure to not kill 
the `StreamThread`?
   
   Now that I am realizing this, I am actually wondering if it's a good idea to 
handle it this way? In the end, for the callee it might be better to figure out 
if the `RackAwareTaskAssignor` can we used or not via method call before we 
create it? Maybe we nee some `static` method into which we pass 
`racksForProcessConsumer`? -- Any other idea to make it more natural for the 
callee?



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to