You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by mj...@apache.org on 2024/08/26 21:05:50 UTC
(kafka) branch trunk updated: KAFKA-16330: Remove deprecated methods of TaskId and make deprecated members private (#16985)
This is an automated email from the ASF dual-hosted git repository.
mjsax 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 bf914b6982c KAFKA-16330: Remove deprecated methods of TaskId and make deprecated members private (#16985)
bf914b6982c is described below
commit bf914b6982c31b62db250406b0db083867e28052
Author: Murali Basani <mu...@aiven.io>
AuthorDate: Mon Aug 26 23:05:43 2024 +0200
KAFKA-16330: Remove deprecated methods of TaskId and make deprecated members private (#16985)
Reviewers: Chia-Ping Tsai <ch...@gmail.com>, Matthias J. Sax <ma...@confluent.io>
---
.../org/apache/kafka/streams/processor/TaskId.java | 47 +---------------------
1 file changed, 2 insertions(+), 45 deletions(-)
diff --git a/streams/src/main/java/org/apache/kafka/streams/processor/TaskId.java b/streams/src/main/java/org/apache/kafka/streams/processor/TaskId.java
index be9b3f88ce2..af742e1a4e5 100644
--- a/streams/src/main/java/org/apache/kafka/streams/processor/TaskId.java
+++ b/streams/src/main/java/org/apache/kafka/streams/processor/TaskId.java
@@ -21,15 +21,8 @@ import org.apache.kafka.streams.errors.TaskIdFormatException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
import java.util.Objects;
-import static org.apache.kafka.streams.processor.internals.assignment.ConsumerProtocolUtils.readTaskIdFrom;
-import static org.apache.kafka.streams.processor.internals.assignment.ConsumerProtocolUtils.writeTaskIdTo;
-
/**
* The task ID representation composed as subtopology (aka topicGroupId) plus the assigned partition ID.
*/
@@ -40,11 +33,9 @@ public class TaskId implements Comparable<TaskId> {
public static final String NAMED_TOPOLOGY_DELIMITER = "__";
/** The ID of the subtopology, aka topicGroupId. */
- @Deprecated
- public final int topicGroupId;
+ private final int topicGroupId;
/** The ID of the partition. */
- @Deprecated
- public final int partition;
+ private final int partition;
/** The namedTopology that this task belongs to, or null if it does not belong to one */
private final String topologyName;
@@ -114,40 +105,6 @@ public class TaskId implements Comparable<TaskId> {
}
}
- /**
- * @throws IOException if cannot write to output stream
- * @deprecated since 3.0, for internal use, will be removed
- */
- @Deprecated
- public void writeTo(final DataOutputStream out, final int version) throws IOException {
- writeTaskIdTo(this, out, version);
- }
-
- /**
- * @throws IOException if cannot read from input stream
- * @deprecated since 3.0, for internal use, will be removed
- */
- @Deprecated
- public static TaskId readFrom(final DataInputStream in, final int version) throws IOException {
- return readTaskIdFrom(in, version);
- }
-
- /**
- * @deprecated since 3.0, for internal use, will be removed
- */
- @Deprecated
- public void writeTo(final ByteBuffer buf, final int version) {
- writeTaskIdTo(this, buf, version);
- }
-
- /**
- * @deprecated since 3.0, for internal use, will be removed
- */
- @Deprecated
- public static TaskId readFrom(final ByteBuffer buf, final int version) {
- return readTaskIdFrom(buf, version);
- }
-
@Override
public boolean equals(final Object o) {
if (this == o) {