Skip to content

Commit b443130

Browse files
KAFKA-19757: Interface stability and deprecation (#20916)
Mark KIP-932 and KIP-1043 interfaces as stable. Tighten up deprecation annotations for interfaces whose removal is planned in AK 5.0. Reviewers: Lianet Magrans <[email protected]>
1 parent fb56f8a commit b443130

36 files changed

+48
-126
lines changed

clients/src/main/java/org/apache/kafka/clients/admin/AlterShareGroupOffsetsOptions.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,12 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
1817
package org.apache.kafka.clients.admin;
1918

20-
import org.apache.kafka.common.annotation.InterfaceStability;
21-
2219
import java.util.Map;
2320

2421
/**
25-
* Options for the {@link Admin#alterShareGroupOffsets(String, Map, AlterShareGroupOffsetsOptions)} call.
26-
* <p>
27-
* The API of this class is evolving, see {@link Admin} for details.
22+
* Options for {@link Admin#alterShareGroupOffsets(String, Map, AlterShareGroupOffsetsOptions)}.
2823
*/
29-
@InterfaceStability.Evolving
3024
public class AlterShareGroupOffsetsOptions extends AbstractOptions<AlterShareGroupOffsetsOptions> {
31-
3225
}

clients/src/main/java/org/apache/kafka/clients/admin/AlterShareGroupOffsetsResult.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
import org.apache.kafka.common.KafkaFuture;
2121
import org.apache.kafka.common.TopicPartition;
22-
import org.apache.kafka.common.annotation.InterfaceStability;
2322
import org.apache.kafka.common.errors.ApiException;
2423
import org.apache.kafka.common.internals.KafkaFutureImpl;
2524
import org.apache.kafka.common.protocol.Errors;
@@ -30,10 +29,7 @@
3029

3130
/**
3231
* The result of the {@link Admin#alterShareGroupOffsets(String, Map, AlterShareGroupOffsetsOptions)} call.
33-
* <p>
34-
* The API of this class is evolving, see {@link Admin} for details.
3532
*/
36-
@InterfaceStability.Evolving
3733
public class AlterShareGroupOffsetsResult {
3834

3935
private final KafkaFuture<Map<TopicPartition, ApiException>> future;

clients/src/main/java/org/apache/kafka/clients/admin/ClassicGroupDescription.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public Node coordinator() {
137137
/**
138138
* authorizedOperations for this group, or null if that information is not known.
139139
*/
140-
public Set<AclOperation> authorizedOperations() {
140+
public Set<AclOperation> authorizedOperations() {
141141
return authorizedOperations;
142142
}
143143

clients/src/main/java/org/apache/kafka/clients/admin/ConsumerGroupDescription.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public class ConsumerGroupDescription {
4949
/**
5050
* @deprecated Since 4.0. Use {@link #ConsumerGroupDescription(String, boolean, Collection, String, GroupType, GroupState, Node, Set, Optional, Optional)} instead.
5151
*/
52-
@Deprecated
52+
@SuppressWarnings("removal")
53+
@Deprecated(since = "4.0", forRemoval = true)
5354
public ConsumerGroupDescription(String groupId,
5455
boolean isSimpleConsumerGroup,
5556
Collection<MemberDescription> members,
@@ -62,7 +63,8 @@ public ConsumerGroupDescription(String groupId,
6263
/**
6364
* @deprecated Since 4.0. Use {@link #ConsumerGroupDescription(String, boolean, Collection, String, GroupType, GroupState, Node, Set, Optional, Optional)} instead.
6465
*/
65-
@Deprecated
66+
@SuppressWarnings("removal")
67+
@Deprecated(since = "4.0", forRemoval = true)
6668
public ConsumerGroupDescription(String groupId,
6769
boolean isSimpleConsumerGroup,
6870
Collection<MemberDescription> members,
@@ -76,7 +78,8 @@ public ConsumerGroupDescription(String groupId,
7678
/**
7779
* @deprecated Since 4.0. Use {@link #ConsumerGroupDescription(String, boolean, Collection, String, GroupType, GroupState, Node, Set, Optional, Optional)} instead.
7880
*/
79-
@Deprecated
81+
@SuppressWarnings("removal")
82+
@Deprecated(since = "4.0", forRemoval = true)
8083
public ConsumerGroupDescription(String groupId,
8184
boolean isSimpleConsumerGroup,
8285
Collection<MemberDescription> members,
@@ -182,7 +185,8 @@ public GroupType type() {
182185
* The consumer group state, or UNKNOWN if the state is too new for us to parse.
183186
* @deprecated Since 4.0. Use {@link #groupState()} instead.
184187
*/
185-
@Deprecated
188+
@SuppressWarnings("removal")
189+
@Deprecated(since = "4.0", forRemoval = true)
186190
public ConsumerGroupState state() {
187191
return ConsumerGroupState.parse(groupState.toString());
188192
}
@@ -204,7 +208,7 @@ public Node coordinator() {
204208
/**
205209
* authorizedOperations for this group, or null if that information is not known.
206210
*/
207-
public Set<AclOperation> authorizedOperations() {
211+
public Set<AclOperation> authorizedOperations() {
208212
return authorizedOperations;
209213
}
210214

clients/src/main/java/org/apache/kafka/clients/admin/ConsumerGroupListing.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
* A listing of a consumer group in the cluster.
2929
* @deprecated Since 4.1. Use {@link Admin#listGroups(ListGroupsOptions)} and {@link GroupListing} instead.
3030
*/
31-
@Deprecated(since = "4.1")
31+
@SuppressWarnings("removal")
32+
@Deprecated(since = "4.1", forRemoval = true)
3233
public class ConsumerGroupListing {
3334
private final String groupId;
3435
private final boolean isSimpleConsumerGroup;

clients/src/main/java/org/apache/kafka/clients/admin/DeleteShareGroupOffsetsOptions.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,12 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
1817
package org.apache.kafka.clients.admin;
1918

20-
import org.apache.kafka.common.annotation.InterfaceStability;
21-
2219
import java.util.Set;
2320

2421
/**
25-
* Options for the {@link Admin#deleteShareGroupOffsets(String, Set, DeleteShareGroupOffsetsOptions)} call.
26-
* <p>
27-
* The API of this class is evolving, see {@link Admin} for details.
22+
* Options for {@link Admin#deleteShareGroupOffsets(String, Set, DeleteShareGroupOffsetsOptions)}.
2823
*/
29-
@InterfaceStability.Evolving
3024
public class DeleteShareGroupOffsetsOptions extends AbstractOptions<DeleteShareGroupOffsetsOptions> {
3125
}

clients/src/main/java/org/apache/kafka/clients/admin/DeleteShareGroupOffsetsResult.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package org.apache.kafka.clients.admin;
1818

1919
import org.apache.kafka.common.KafkaFuture;
20-
import org.apache.kafka.common.annotation.InterfaceStability;
2120
import org.apache.kafka.common.errors.ApiException;
2221
import org.apache.kafka.common.internals.KafkaFutureImpl;
2322

@@ -26,10 +25,7 @@
2625

2726
/**
2827
* The result of the {@link Admin#deleteShareGroupOffsets(String, Set, DeleteShareGroupOffsetsOptions)} call.
29-
* <p>
30-
* The API of this class is evolving, see {@link Admin} for details.
3128
*/
32-
@InterfaceStability.Evolving
3329
public class DeleteShareGroupOffsetsResult {
3430

3531
private final KafkaFuture<Map<String, ApiException>> future;

clients/src/main/java/org/apache/kafka/clients/admin/DeleteShareGroupsOptions.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,12 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
1817
package org.apache.kafka.clients.admin;
1918

20-
import org.apache.kafka.common.annotation.InterfaceStability;
21-
2219
import java.util.Collection;
2320

2421
/**
25-
* Options for the {@link Admin#deleteShareGroups(Collection, DeleteShareGroupsOptions)} call.
26-
* <p>
27-
* The API of this class is evolving, see {@link Admin} for details.
22+
* Options for {@link Admin#deleteShareGroups(Collection, DeleteShareGroupsOptions)}.
2823
*/
29-
@InterfaceStability.Evolving
3024
public class DeleteShareGroupsOptions extends AbstractOptions<DeleteShareGroupsOptions> {
3125
}

clients/src/main/java/org/apache/kafka/clients/admin/DeleteShareGroupsResult.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,17 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
1817
package org.apache.kafka.clients.admin;
1918

2019
import org.apache.kafka.common.KafkaFuture;
21-
import org.apache.kafka.common.annotation.InterfaceStability;
2220

2321
import java.util.Collection;
2422
import java.util.HashMap;
2523
import java.util.Map;
2624

2725
/**
2826
* The result of the {@link Admin#deleteShareGroups(Collection, DeleteShareGroupsOptions)} call.
29-
* <p></p>
30-
* The API of this class is evolving, see {@link Admin} for details.
3127
*/
32-
@InterfaceStability.Evolving
3328
public class DeleteShareGroupsResult {
3429
private final Map<String, KafkaFuture<Void>> futures;
3530

clients/src/main/java/org/apache/kafka/clients/admin/DescribeClassicGroupsOptions.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,11 @@
1717

1818
package org.apache.kafka.clients.admin;
1919

20-
import org.apache.kafka.common.annotation.InterfaceStability;
21-
2220
import java.util.Collection;
2321

2422
/**
2523
* Options for {@link Admin#describeClassicGroups(Collection, DescribeClassicGroupsOptions)}.
26-
* <p>
27-
* The API of this class is evolving, see {@link Admin} for details.
2824
*/
29-
@InterfaceStability.Evolving
3025
public class DescribeClassicGroupsOptions extends AbstractOptions<DescribeClassicGroupsOptions> {
3126
private boolean includeAuthorizedOperations;
3227

0 commit comments

Comments
 (0)