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


##########
streams/src/main/java/org/apache/kafka/streams/processor/assignment/TopicPartitionAssignmentInfo.java:
##########
@@ -0,0 +1,61 @@
+/*
+ * 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.streams.processor.assignment;
+
+import java.util.Optional;
+import java.util.Set;
+
+/**
+ * This is a simple container class used during the assignment process to 
distinguish
+ * TopicPartitions type. Since the assignment logic can depend on the type of 
topic we're
+ * looking at, and the rack information of the partition, this container class 
should have
+ * everything necessary to make informed task assignment decisions.
+ */
+public interface TopicPartitionAssignmentInfo {
+    /**
+     *
+     * @return the string name of the topic.
+     */
+    String topic();
+
+    /**
+     *
+     * @return the partition id of this topic partition.
+     */
+    int partition();

Review Comment:
   nit: I'd return the TopicPartition directly rather than having APIs for the 
partition and topic separately



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