THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
public class AlteredTopic { public AlteredTopic(String name, int numPartitions, int replicationFactor, Map<Integer,List<Integer>> replicasAssignment) { // ... } /** The name of the topic to alter. */ public String name(); /** The new number of partitions, or -1 if the number of partitions should not be changed. */ public int numPartitions(); /** The new replication factor, or -1 if the replication factor should not be changed. */ public int replicationFactor(); /** * The new assignments of partition to brokers, or the empty map * if the broker should assign replicas automatically. */ Map<Integer,List<Integer>> replicasAssignment(); } public class AlterTopicsOptions { public AlterTopicsOptions validateOnly(boolean validateOnly); public boolean validateOnly(); } public class AlterTopicsResult { // package-access constructor /** A mapping of the name of a requested topic to the error for that topic. */ KafkaFuture<Map<StringMap<String, Errors>>KafkaFuture<Void>> resultvalues(); /** The error for a give topicReturn a future which succeeds if all the topic alterations were accepted. */ KafkaFuture<Errors>KafkaFuture<Void> topicResultall(String topicName); } |
AdminClient: replicaStatus
...
Where:
Code Block |
---|
public class ReplicaStatusOptions { } public class ReplicaStatusResult { public KafkaFuture<Map<TopicPartition, List<ReplicaStatus>>> all() } /** * Represents the replication status of a partition * on a particular broker. */ public class ReplicaStatus { /** The topic about which this is the status of */ String topic() /** The partition about which this is the status of */ int partition() /** The broker about which this is the status of */ int broker() /** * The time (as milliseconds since the epoch) that * this status data was collected. In general this may * be some time before the replicaStatus() request time. */ public long statusTime() /** * The number of messages that the replica on this broker is behind * the leader. */ public long lag() } |
...