kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [kafka] branch 2.4 updated: MINOR: Add toString to PartitionReassignment (#7579)
Date Wed, 23 Oct 2019 00:18:10 GMT
This is an automated email from the ASF dual-hosted git repository.

jgus pushed a commit to branch 2.4
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.4 by this push:
     new b68300f  MINOR: Add toString to PartitionReassignment (#7579)
b68300f is described below

commit b68300f0ce0c524235462bdd2ef8ba3d176d19b7
Author: Jason Gustafson <jason@confluent.io>
AuthorDate: Tue Oct 22 17:11:58 2019 -0700

    MINOR: Add toString to PartitionReassignment (#7579)
    
    This patch adds a `toString()` implementation to `PartitionReassignment`. It also makes
the `ListPartitionReassignmentsResult` constructor use default access, which is the standard
for the admin client *Result classes.
    
    Reviewers: Guozhang Wang <wangguoz@gmail.com>
---
 .../kafka/clients/admin/ListPartitionReassignmentsResult.java |  2 +-
 .../org/apache/kafka/clients/admin/PartitionReassignment.java | 11 ++++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/clients/src/main/java/org/apache/kafka/clients/admin/ListPartitionReassignmentsResult.java
b/clients/src/main/java/org/apache/kafka/clients/admin/ListPartitionReassignmentsResult.java
index 3d7b14c..bc72c06 100644
--- a/clients/src/main/java/org/apache/kafka/clients/admin/ListPartitionReassignmentsResult.java
+++ b/clients/src/main/java/org/apache/kafka/clients/admin/ListPartitionReassignmentsResult.java
@@ -30,7 +30,7 @@ import java.util.Map;
 public class ListPartitionReassignmentsResult {
     private final KafkaFuture<Map<TopicPartition, PartitionReassignment>> future;
 
-    public ListPartitionReassignmentsResult(KafkaFuture<Map<TopicPartition, PartitionReassignment>>
reassignments) {
+    ListPartitionReassignmentsResult(KafkaFuture<Map<TopicPartition, PartitionReassignment>>
reassignments) {
         this.future = reassignments;
     }
 
diff --git a/clients/src/main/java/org/apache/kafka/clients/admin/PartitionReassignment.java
b/clients/src/main/java/org/apache/kafka/clients/admin/PartitionReassignment.java
index cc3306e..4a9d151 100644
--- a/clients/src/main/java/org/apache/kafka/clients/admin/PartitionReassignment.java
+++ b/clients/src/main/java/org/apache/kafka/clients/admin/PartitionReassignment.java
@@ -57,4 +57,13 @@ public class PartitionReassignment {
     public List<Integer> removingReplicas() {
         return removingReplicas;
     }
-}
\ No newline at end of file
+
+    @Override
+    public String toString() {
+        return "PartitionReassignment(" +
+                "replicas=" + replicas +
+                ", addingReplicas=" + addingReplicas +
+                ", removingReplicas=" + removingReplicas +
+                ')';
+    }
+}


Mime
View raw message