mjsax commented on code in PR #23790: URL: https://github.com/apache/kafka/pull/23790#discussion_r4545681538
########## group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/assignor/RackAwareStandbyPicker.java: ########## @@ -0,0 +1,452 @@ +/* + * 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.kafka.coordinator.group.streams.assignor; + +import org.apache.kafka.coordinator.group.Utils; + +import java.util.ArrayList; +import java.util.BitSet; +import java.util.Collection; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.TreeSet; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.function.ToDoubleFunction; +import java.util.stream.IntStream; + +/** + * Picks the conditions for the next standby of one task: the most tag keys that a process with room can meet, + * preferring the keys earlier in {@code rack.aware.assignment.tags}. A process meets a tag key when it has a value + * for it that no holder of the task has yet. A pick also returns the least-loaded process with room that meets the + * conditions, and the picker can tell whether a process meets them. The caller reports every change to a load or room Review Comment: > and the picker can tell whether a process meets them This sound redundant? If a "pick also returns [... a] process [...] that meets the condition", it can obviously tell if the process meets the condition or not. Not sure what we try to say here? -- 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]
