cadonna commented on code in PR #17433:
URL: https://github.com/apache/kafka/pull/17433#discussion_r1820396579


##########
core/src/main/scala/kafka/server/AutoTopicCreationManager.scala:
##########
@@ -108,6 +115,32 @@ class DefaultAutoTopicCreationManager(
     uncreatableTopicResponses ++ creatableTopicResponses
   }
 
+  override def createStreamsInternalTopics(
+    topics: Map[String, CreatableTopic],
+    requestContext: RequestContext
+  ): Unit = {
+
+    // Set default values for numPartitions and replicationFactor if they are 
not provided

Review Comment:
   Really needed?



##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/StreamsGroupInitializeResult.java:
##########
@@ -0,0 +1,74 @@
+/*
+ * 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;
+
+import org.apache.kafka.common.message.CreateTopicsRequestData.CreatableTopic;
+import org.apache.kafka.common.message.StreamsGroupInitializeResponseData;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Objects;
+
+public class StreamsGroupInitializeResult {
+
+    private final StreamsGroupInitializeResponseData data;
+    private final Map<String, CreatableTopic> creatableTopics;
+
+    public StreamsGroupInitializeResult(StreamsGroupInitializeResponseData 
data, Map<String, CreatableTopic> creatableTopics) {
+        this.data = data;
+        this.creatableTopics = creatableTopics;
+    }
+
+    public StreamsGroupInitializeResult(StreamsGroupInitializeResponseData 
data) {
+        this.data = data;
+        this.creatableTopics = Collections.emptyMap();
+    }
+
+    public StreamsGroupInitializeResponseData data() {

Review Comment:
   `responseData()` would be more meaningful, IMO.



##########
core/src/main/scala/kafka/server/AutoTopicCreationManager.scala:
##########
@@ -159,8 +192,8 @@ class DefaultAutoTopicCreationManager(
   }
 
   private def sendCreateTopicRequest(
-    creatableTopics: Map[String, CreatableTopic],
-    metadataRequestContext: Option[RequestContext]
+                                      creatableTopics: Map[String, 
CreatableTopic],
+                                      requestContext: Option[RequestContext]

Review Comment:
   nit: This indentation seems quite off compared to the other methods in this 
class.



##########
streams/src/test/resources/log4j.properties:
##########
@@ -29,6 +29,8 @@ log4j.logger.org.apache.kafka.clients.consumer=INFO
 log4j.logger.org.apache.kafka.clients.producer=INFO
 log4j.logger.org.apache.kafka.streams=INFO
 log4j.logger.org.apache.kafka.coordinator.group=INFO
+log4j.logger.org.apache.kafka.clients.consumer.internals.StreamsGroupInitializeRequestManager=INFO
+log4j.logger.org.apache.kafka.clients.consumer.internals.StreamsGroupHeartbeatRequestManager=INFO

Review Comment:
   Are these remainings of a debug session?



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