geyanggang commented on code in PR #14963:
URL: https://github.com/apache/gravitino/pull/14963#discussion_r4561295057


##########
NOTICE.bin:
##########
@@ -34,7 +34,7 @@ Apache Iceberg
 Copyright 2017-2026 The Apache Software Foundation
 
 Apache Kafka
-Copyright 2011-2023 The Apache Software Foundation
+Copyright 2026 The Apache Software Foundation

Review Comment:
   Mirrored verbatim: the `NOTICE` file inside `kafka-clients-3.9.2.jar` reads 
`Apache Kafka / Copyright 2026 The Apache Software Foundation.`, with no year 
range. The previous `2011-2023` line came from the older release, so no prior 
years are dropped from Kafka's own notice.



##########
catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/KafkaClusterEmbedded.java:
##########
@@ -83,21 +79,19 @@ public static String brokerList() {
 
   private static Properties initBrokerConfig() {
     Properties configs = new Properties();
-    configs.put(KafkaConfig$.MODULE$.ZkConnectProp(), 
zookeeper.connectString());
-    configs.put(KafkaConfig$.MODULE$.ZkSessionTimeoutMsProp(), 30 * 1000);
-    configs.put(KafkaConfig$.MODULE$.ZkConnectionTimeoutMsProp(), 60 * 1000);
-    configs.put(KafkaConfig$.MODULE$.DeleteTopicEnableProp(), true);
-    configs.put(KafkaConfig$.MODULE$.LogCleanerDedupeBufferSizeProp(), 2 * 
1024 * 1024L);
-    configs.put(KafkaConfig$.MODULE$.GroupMinSessionTimeoutMsProp(), 0);
-    configs.put(KafkaConfig$.MODULE$.OffsetsTopicReplicationFactorProp(), 
(short) 1);
-    configs.put(KafkaConfig$.MODULE$.OffsetsTopicPartitionsProp(), 1);
-    configs.put(KafkaConfig$.MODULE$.AutoCreateTopicsEnableProp(), true);
+    configs.put("zookeeper.connect", zookeeper.connectString());
+    configs.put("zookeeper.session.timeout.ms", 30 * 1000);
+    configs.put("zookeeper.connection.timeout.ms", 60 * 1000);
+    configs.put("delete.topic.enable", true);
+    configs.put("log.cleaner.dedupe.buffer.size", 2 * 1024 * 1024L);
+    configs.put("group.min.session.timeout.ms", 0);
+    configs.put("offsets.topic.replication.factor", (short) 1);
+    configs.put("offsets.topic.num.partitions", 1);
+    configs.put("auto.create.topics.enable", true);

Review Comment:
   Done in the latest push: the keys now live as named constants in a new test 
helper, `BrokerConfigKeys`, used by both `KafkaClusterEmbedded` and 
`KafkaEmbedded`. I did not use Kafka's own constants 
(`org.apache.kafka.server.config.*`) because they are internal server classes 
that are not on the test compile classpath (they come from 
`kafka-server-common`, runtime-scoped here), and the Scala accessors were what 
broke on this upgrade.



##########
catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/KafkaEmbedded.java:
##########
@@ -106,14 +105,14 @@ public void stop() throws IOException {
 
   private Properties effectiveConfigFrom(final Properties initialConfig) {
     final Properties effectiveConfig = new Properties();
-    effectiveConfig.put(KafkaConfig$.MODULE$.BrokerIdProp(), 0);
-    effectiveConfig.put(KafkaConfig$.MODULE$.NumPartitionsProp(), 1);
-    effectiveConfig.put(KafkaConfig$.MODULE$.AutoCreateTopicsEnableProp(), 
true);
-    effectiveConfig.put(KafkaConfig$.MODULE$.MessageMaxBytesProp(), 1000000);
-    effectiveConfig.put(KafkaConfig$.MODULE$.ControlledShutdownEnableProp(), 
true);
+    effectiveConfig.put("broker.id", 0);
+    effectiveConfig.put("num.partitions", 1);
+    effectiveConfig.put("auto.create.topics.enable", true);
+    effectiveConfig.put("message.max.bytes", 1000000);
+    effectiveConfig.put("controlled.shutdown.enable", true);
 
     effectiveConfig.putAll(initialConfig);
-    effectiveConfig.setProperty(KafkaConfig$.MODULE$.LogDirProp(), LOG_DIR);
+    effectiveConfig.setProperty("log.dir", LOG_DIR);

Review Comment:
   Same as above, addressed by `BrokerConfigKeys`.



##########
catalogs/catalog-kafka/src/test/java/org/apache/gravitino/catalog/kafka/embedded/KafkaEmbedded.java:
##########
@@ -106,14 +105,14 @@ public void stop() throws IOException {
 
   private Properties effectiveConfigFrom(final Properties initialConfig) {
     final Properties effectiveConfig = new Properties();
-    effectiveConfig.put(KafkaConfig$.MODULE$.BrokerIdProp(), 0);
-    effectiveConfig.put(KafkaConfig$.MODULE$.NumPartitionsProp(), 1);
-    effectiveConfig.put(KafkaConfig$.MODULE$.AutoCreateTopicsEnableProp(), 
true);
-    effectiveConfig.put(KafkaConfig$.MODULE$.MessageMaxBytesProp(), 1000000);
-    effectiveConfig.put(KafkaConfig$.MODULE$.ControlledShutdownEnableProp(), 
true);
+    effectiveConfig.put("broker.id", 0);
+    effectiveConfig.put("num.partitions", 1);
+    effectiveConfig.put("auto.create.topics.enable", true);
+    effectiveConfig.put("message.max.bytes", 1000000);
+    effectiveConfig.put("controlled.shutdown.enable", true);
 
     effectiveConfig.putAll(initialConfig);
-    effectiveConfig.setProperty(KafkaConfig$.MODULE$.LogDirProp(), LOG_DIR);
+    effectiveConfig.setProperty("log.dir", LOG_DIR);

Review Comment:
   Kept `log.dir` on purpose. It is not deprecated: Kafka documents it as the 
supplemental setting for `log.dirs`, and it is what the previous code set 
through `KafkaConfig.LogDirProp()`. Keeping it means this change does not alter 
the embedded broker's behaviour. It is now the `LOG_DIR` constant in 
`BrokerConfigKeys`.



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