[kafka] branch trunk updated: MINOR: add java 8/scala 2.12 deprecation info in doc (#12261)

2022-06-08 Thread showuon
This is an automated email from the ASF dual-hosted git repository.

showuon pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 4f40883d02 MINOR: add java 8/scala 2.12 deprecation info in doc 
(#12261)
4f40883d02 is described below

commit 4f40883d02646564e3bdabbfa2b57ad58cc31dbd
Author: Luke Chen 
AuthorDate: Thu Jun 9 09:39:23 2022 +0800

MINOR: add java 8/scala 2.12 deprecation info in doc (#12261)

Reviewers: Ismael Juma 
---
 docs/ops.html | 3 ++-
 docs/upgrade.html | 5 -
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/docs/ops.html b/docs/ops.html
index 0c1973bd69..5ace510c4c 100644
--- a/docs/ops.html
+++ b/docs/ops.html
@@ -1266,7 +1266,8 @@ $ bin/kafka-acls.sh \
 
   6.6 Java Version
 
-  Java 8 and Java 11 are supported. Java 11 performs significantly better if 
TLS is enabled, so it is highly recommended (it also includes a number of other
+  Java 8, Java 11, and Java 17 are supported. Note that Java 8 support has 
been deprecated since Apache Kafka 3.0 and will be removed in Apache Kafka 4.0.
+  Java 11 and later versions perform significantly better if TLS is enabled, 
so they are highly recommended (they also include a number of other
   performance improvements: G1GC, CRC32C, Compact Strings, Thread-Local 
Handshakes and more).
   
   From a security perspective, we recommend the latest released patch version 
as older freely available versions have disclosed security vulnerabilities.
diff --git a/docs/upgrade.html b/docs/upgrade.html
index 33971a79c1..b29259aa2b 100644
--- a/docs/upgrade.html
+++ b/docs/upgrade.html
@@ -217,7 +217,10 @@
 See https://cwiki.apache.org/confluence/display/KAFKA/KIP-679%3A+Producer+will+enable+the+strongest+delivery+guarantee+by+default;>KIP-679
 for details.
In 3.0.0 and 3.1.0, a bug prevented the idempotence default from being 
applied which meant that it remained disabled unless the user had explicitly set
enable.idempotence to true. Note that the bug did not 
affect the acks=all change. See https://issues.apache.org/jira/browse/KAFKA-13598;>KAFKA-13598for 
more details.
-This issue was fixed and the default is properly applied in 3.0.1, 
3.1.1, and 3.2.0.
+This issue was fixed and the default is properly applied in 3.0.1, 
3.1.1, and 3.2.0.
+Java 8 and Scala 2.12 support have been deprecated since Apache Kafka 
3.0 and will be removed in Apache Kafka 4.0.
+See https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=181308223;>KIP-750
+and https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=181308218;>KIP-751
 for more details.
 ZooKeeper has been upgraded to version 3.6.3.
 A preview of KRaft mode is available, though upgrading to it from the 
2.8 Early Access release is not possible. See
 the config/kraft/README.md file for details.



[kafka] branch trunk updated: MINOR: Fix typo in Kafka config docs (#12268)

2022-06-08 Thread guozhang
This is an automated email from the ASF dual-hosted git repository.

guozhang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 249cd4461f MINOR: Fix typo in Kafka config docs (#12268)
249cd4461f is described below

commit 249cd4461faf003e6baa2327e9ceb130eb80c952
Author: Joel Hamill <11722533+joel-ham...@users.noreply.github.com>
AuthorDate: Wed Jun 8 13:51:41 2022 -0700

MINOR: Fix typo in Kafka config docs (#12268)

Reviewers: Guozhang Wang 
---
 core/src/main/scala/kafka/server/KafkaConfig.scala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/src/main/scala/kafka/server/KafkaConfig.scala 
b/core/src/main/scala/kafka/server/KafkaConfig.scala
index f751cc21a6..3d7df18cbb 100755
--- a/core/src/main/scala/kafka/server/KafkaConfig.scala
+++ b/core/src/main/scala/kafka/server/KafkaConfig.scala
@@ -980,8 +980,8 @@ object KafkaConfig {
   val ControllerQuotaWindowSizeSecondsDoc = "The time span of each sample for 
controller mutations quotas"
 
   val ClientQuotaCallbackClassDoc = "The fully qualified name of a class that 
implements the ClientQuotaCallback interface, " +
-"which is used to determine quota limits applied to client requests. By 
default, user, client-id, user or client-id " +
-"quotas stored in ZooKeeper are applied. For any given request, the most 
specific quota that matches the user principal " +
+"which is used to determine quota limits applied to client requests. By 
default, the user and client-id " +
+"quotas that are stored in ZooKeeper are applied. For any given request, 
the most specific quota that matches the user principal " +
 "of the session and the client-id of the request is applied."
 
   val DeleteTopicEnableDoc = "Enables delete topic. Delete topic through the 
admin tool will have no effect if this config is turned off"



[kafka] branch trunk updated: MINOR; Test last committed record offset for Controllers (#12249)

2022-06-08 Thread jsancio
This is an automated email from the ASF dual-hosted git repository.

jsancio pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 21490af989 MINOR; Test last committed record offset for Controllers 
(#12249)
21490af989 is described below

commit 21490af989ec02916adcd64ea5cf439dbb682525
Author: José Armando García Sancio 
AuthorDate: Wed Jun 8 10:45:04 2022 -0700

MINOR; Test last committed record offset for Controllers (#12249)

As part of KIP-835, LastCommittedRecordOffset was added to the
KafkaController metric type. Make sure to test that metric.

Reviewers: Jason Gustafson 
---
 core/src/test/scala/unit/kafka/metrics/MetricsTest.scala  |  1 +
 .../apache/kafka/controller/QuorumControllerMetricsTest.java  | 11 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/core/src/test/scala/unit/kafka/metrics/MetricsTest.scala 
b/core/src/test/scala/unit/kafka/metrics/MetricsTest.scala
index 44a1e53f47..b21fe877f2 100644
--- a/core/src/test/scala/unit/kafka/metrics/MetricsTest.scala
+++ b/core/src/test/scala/unit/kafka/metrics/MetricsTest.scala
@@ -239,6 +239,7 @@ class MetricsTest extends KafkaServerTestHarness with 
Logging {
 assertEquals(metrics.keySet.asScala.count(_.getMBeanName == 
"kafka.controller:type=KafkaController,name=PreferredReplicaImbalanceCount"), 1)
 assertEquals(metrics.keySet.asScala.count(_.getMBeanName == 
"kafka.controller:type=KafkaController,name=GlobalTopicCount"), 1)
 assertEquals(metrics.keySet.asScala.count(_.getMBeanName == 
"kafka.controller:type=KafkaController,name=GlobalPartitionCount"), 1)
+assertEquals(metrics.keySet.asScala.count(_.getMBeanName == 
"kafka.controller:type=KafkaController,name=LastCommittedRecordOffset"), 1)
 assertEquals(metrics.keySet.asScala.count(_.getMBeanName == 
"kafka.controller:type=KafkaController,name=LastAppliedRecordOffset"), 1)
 assertEquals(metrics.keySet.asScala.count(_.getMBeanName == 
"kafka.controller:type=KafkaController,name=LastAppliedRecordTimestamp"), 1)
 assertEquals(metrics.keySet.asScala.count(_.getMBeanName == 
"kafka.controller:type=KafkaController,name=LastAppliedRecordLagMs"), 1)
diff --git 
a/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerMetricsTest.java
 
b/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerMetricsTest.java
index 21ac02f49e..2ab9995594 100644
--- 
a/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerMetricsTest.java
+++ 
b/metadata/src/test/java/org/apache/kafka/controller/QuorumControllerMetricsTest.java
@@ -40,9 +40,11 @@ public class QuorumControllerMetricsTest {
 "GlobalPartitionCount",
 "OfflinePartitionsCount",
 "PreferredReplicaImbalanceCount",
+"LastAppliedRecordLagMs",
 "LastAppliedRecordOffset",
 "LastAppliedRecordTimestamp",
-"LastAppliedRecordLagMs");
+"LastCommittedRecordOffset"
+);
 assertMetricsCreatedAndRemovedUponClose(expectedType, 
expectedMetricNames);
 }
 
@@ -92,6 +94,7 @@ public class QuorumControllerMetricsTest {
 try (QuorumControllerMetrics quorumControllerMetrics = new 
QuorumControllerMetrics(registry, time)) {
 quorumControllerMetrics.setLastAppliedRecordOffset(100);
 quorumControllerMetrics.setLastAppliedRecordTimestamp(500);
+quorumControllerMetrics.setLastCommittedRecordOffset(50);
 
 @SuppressWarnings("unchecked")
 Gauge lastAppliedRecordOffset = (Gauge) registry
@@ -110,6 +113,12 @@ public class QuorumControllerMetricsTest {
 .allMetrics()
 .get(metricName("KafkaController", 
"LastAppliedRecordLagMs"));
 assertEquals(time.milliseconds() - 500, 
lastAppliedRecordLagMs.value());
+
+@SuppressWarnings("unchecked")
+Gauge lastCommittedRecordOffset = (Gauge) registry
+.allMetrics()
+.get(metricName("KafkaController", 
"LastCommittedRecordOffset"));
+assertEquals(50, lastCommittedRecordOffset.value());
 }
 } finally {
 registry.shutdown();



[kafka] branch trunk updated: MINOR: adjust logging levels in Stream tests (#12255)

2022-06-08 Thread ableegoldman
This is an automated email from the ASF dual-hosted git repository.

ableegoldman pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 1e2611aed4 MINOR: adjust logging levels in Stream tests (#12255)
1e2611aed4 is described below

commit 1e2611aed4bd86ddba1631d9b2c3c5d4661b33d0
Author: A. Sophie Blee-Goldman 
AuthorDate: Wed Jun 8 02:02:40 2022 -0700

MINOR: adjust logging levels in Stream tests (#12255)

Now that we've turned off logging in the brokers/zookeeper/config classes 
we can finally see at least some of the logs where Streams is actually doing 
something when trying to debug tests from a failed PR build. But I've noticed 
we still have some flooding of warnings from the NetworkClient and info-level 
junk from Metadata, so to maximize the visible useful logs we should filter out 
everything bu the producer/consumer client themselves (in addition to Streams) 
fine-grained logging

Reviewers: Luke Chen , Kvicii Y
---
 streams/src/test/resources/log4j.properties | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/streams/src/test/resources/log4j.properties 
b/streams/src/test/resources/log4j.properties
index 050cd679f0..b7e1fb2d60 100644
--- a/streams/src/test/resources/log4j.properties
+++ b/streams/src/test/resources/log4j.properties
@@ -22,6 +22,12 @@ log4j.logger.kafka=ERROR
 log4j.logger.state.change.logger=ERROR
 log4j.logger.org.apache.kafka=ERROR
 log4j.logger.org.apache.zookeeper=ERROR
+log4j.logger.org.apache.kafka.clients=ERROR
+
+# These are the only logs we will likely ever find anything useful in to debug 
Streams test failures
+log4j.logger.org.apache.kafka.clients.consumer=INFO
+log4j.logger.org.apache.kafka.clients.producer=INFO
+log4j.logger.org.apache.kafka.streams=INFO
 
 # printing out the configs takes up a huge amount of the allotted characters,
 # and provides little value as we can always figure out the test configs 
without the logs
@@ -29,7 +35,3 @@ 
log4j.logger.org.apache.kafka.clients.producer.ProducerConfig=ERROR
 log4j.logger.org.apache.kafka.clients.consumer.ConsumerConfig=ERROR
 log4j.logger.org.apache.kafka.clients.admin.AdminClientConfig=ERROR
 log4j.logger.org.apache.kafka.streams.StreamsConfig=ERROR
-
-# These are the only logs we will likely ever find anything useful in to debug 
Streams test failures
-log4j.logger.org.apache.kafka.clients=INFO
-log4j.logger.org.apache.kafka.streams=INFO