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:22:35 UTC
[kafka] branch trunk 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 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 987aafe MINOR: Remove unused LeaderAndIsrResponse.partitions() since it has been replaced with partitionErrors() (#10127)
987aafe is described below
commit 987aafeddf69645b6089306dac8f9f32ac7cd9b3
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());
}