You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by rs...@apache.org on 2021/02/15 12:34:28 UTC
[kafka] branch 2.8 updated: MINOR: Remove unused
LeaderAndIsrResponse.partitions() since it has been replaced with
partitionErrors() (#10127)
This is an automated email from the ASF dual-hosted git repository.
rsivaram pushed a commit to branch 2.8
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/2.8 by this push:
new 1392382 MINOR: Remove unused LeaderAndIsrResponse.partitions() since it has been replaced with partitionErrors() (#10127)
1392382 is described below
commit 1392382a54f0b4f134d3dd7134628825b831bad1
Author: Rajini Sivaram <ra...@googlemail.com>
AuthorDate: Mon Feb 15 12:21:01 2021 +0000
MINOR: Remove unused LeaderAndIsrResponse.partitions() since it has been replaced with partitionErrors() (#10127)
Reviewers: David Jacot <dj...@confluent.io>
---
.../org/apache/kafka/common/requests/LeaderAndIsrResponse.java | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/clients/src/main/java/org/apache/kafka/common/requests/LeaderAndIsrResponse.java b/clients/src/main/java/org/apache/kafka/common/requests/LeaderAndIsrResponse.java
index 60ab3d5..490983f 100644
--- a/clients/src/main/java/org/apache/kafka/common/requests/LeaderAndIsrResponse.java
+++ b/clients/src/main/java/org/apache/kafka/common/requests/LeaderAndIsrResponse.java
@@ -20,11 +20,9 @@ import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.common.Uuid;
import org.apache.kafka.common.message.LeaderAndIsrResponseData;
import org.apache.kafka.common.message.LeaderAndIsrResponseData.LeaderAndIsrTopicError;
-import org.apache.kafka.common.message.LeaderAndIsrResponseData.LeaderAndIsrPartitionError;
import org.apache.kafka.common.protocol.ApiKeys;
import org.apache.kafka.common.protocol.ByteBufferAccessor;
import org.apache.kafka.common.protocol.Errors;
-import org.apache.kafka.common.utils.FlattenedIterator;
import java.nio.ByteBuffer;
import java.util.Collections;
@@ -53,14 +51,6 @@ public class LeaderAndIsrResponse extends AbstractResponse {
return this.data.topics();
}
- public Iterable<LeaderAndIsrPartitionError> partitions() {
- if (version < 5) {
- return data.partitionErrors();
- }
- return () -> new FlattenedIterator<>(data.topics().iterator(),
- topic -> topic.partitionErrors().iterator());
- }
-
public Errors error() {
return Errors.forCode(data.errorCode());
}