From 73f9cd649968f63ce765215331164e8f96e87a88 Mon Sep 17 00:00:00 2001 From: Ismael Juma Date: Wed, 2 Jun 2021 06:27:47 -0700 Subject: [PATCH] KAFKA-12880: Remove deprecated `Count` and `SampledTotal` in 3.0 --- .../kafka/common/metrics/stats/Count.java | 29 ------------------- .../kafka/common/metrics/stats/Rate.java | 7 ----- docs/upgrade.html | 4 ++- 3 files changed, 3 insertions(+), 37 deletions(-) delete mode 100644 clients/src/main/java/org/apache/kafka/common/metrics/stats/Count.java diff --git a/clients/src/main/java/org/apache/kafka/common/metrics/stats/Count.java b/clients/src/main/java/org/apache/kafka/common/metrics/stats/Count.java deleted file mode 100644 index 2bef7cf93d8bb..0000000000000 --- a/clients/src/main/java/org/apache/kafka/common/metrics/stats/Count.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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.common.metrics.stats; - -/** - * A {@link SampledStat} that maintains a simple count of what it has seen. - * This is a special kind of {@link WindowedSum} that always records a value of {@code 1} instead of the provided value. - * - * See also {@link CumulativeCount} for a non-sampled version of this metric. - * - * @deprecated since 2.4 . Use {@link WindowedCount} instead - */ -@Deprecated -public class Count extends WindowedCount { -} diff --git a/clients/src/main/java/org/apache/kafka/common/metrics/stats/Rate.java b/clients/src/main/java/org/apache/kafka/common/metrics/stats/Rate.java index 952b0fb323e85..c6b8574186a88 100644 --- a/clients/src/main/java/org/apache/kafka/common/metrics/stats/Rate.java +++ b/clients/src/main/java/org/apache/kafka/common/metrics/stats/Rate.java @@ -101,11 +101,4 @@ public String toString() { ", stat=" + stat + ')'; } - - /** - * @deprecated since 2.4 Use {@link WindowedSum} instead. - */ - @Deprecated - public static class SampledTotal extends WindowedSum { - } } diff --git a/docs/upgrade.html b/docs/upgrade.html index 6908a8b9184f2..bfb38abb603b6 100644 --- a/docs/upgrade.html +++ b/docs/upgrade.html @@ -36,11 +36,14 @@
Notable changes in 3
  • The Metric#value() method was removed (KAFKA-12573).
  • The Sum and Total classes were removed (KAFKA-12584). Please use WindowedSum and CumulativeSum instead.
  • +
  • The Count and SampledTotal classes were removed. Please use WindowedCount and WindowedSum + respectively instead.
  • The PrincipalBuilder, DefaultPrincipalBuilder and ResourceFilter classes were removed.
  • Various constants and constructors were removed from SslConfigs, SaslConfigs, AclBinding and AclBindingFilter.
  • The Admin.electedPreferredLeaders() methods were removed. Please use Admin.electLeaders instead.
  • The kafka-preferred-replica-election command line tool was removed. Please use kafka-leader-election instead.
  • +
  • The --zookeeper option was removed from the bin/kafka-topics.sh command line tool. Please use --bootstrap-server instead.
  • The ConfigEntry constructor was removed (KAFKA-12577). Please use the remaining public constructor instead.
  • The config value default for the client config client.dns.lookup has been removed. In the unlikely @@ -65,7 +68,6 @@
    Notable changes in 3 org.apache.kafka.clients.consumer.ConsumerPartitionAssignor instead.
  • The quota.producer.default and quota.consumer.default configurations were removed (KAFKA-12591). Dynamic quota defaults must be used instead.
  • -
  • The --zookeeper option was removed from the bin/kafka-topics.sh command line tool. Please use --bootstrap-server instead.
  • The Producer#sendOffsetsToTransaction(Map offsets, String consumerGroupId) method has been deprecated. Please use Producer#sendOffsetsToTransaction(Map offsets, ConsumerGroupMetadata metadata) instead, where the ConsumerGroupMetadata