Class AdminClientTestUtils
java.lang.Object
org.apache.kafka.clients.admin.AdminClientTestUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.kafka.clients.admin.AlterConfigsResultalterConfigsResult(org.apache.kafka.common.config.ConfigResource cr) Helper to create a AlterConfigsResult instance for a given ConfigResource.static org.apache.kafka.clients.admin.AlterConfigsResultalterConfigsResult(org.apache.kafka.common.config.ConfigResource cr, Throwable t) Helper to create a AlterConfigsResult instance for a given Throwable.static org.apache.kafka.clients.admin.BrokerHealthStatusResultbrokerHealthStatusResult(Integer brokerId, org.apache.kafka.clients.admin.BrokerComponent brokerComponent, org.apache.kafka.clients.admin.ComponentHealthStatus componentHealthStatus) Used for BrokerHealthCommand tests as the constructor is only accessible from within the admin packagestatic org.apache.kafka.clients.admin.AdminHelper to create a KafkaAdminClient with a custom HostResolver accessible to tests outside this package.static org.apache.kafka.clients.admin.ListOffsetsResultcreateListOffsetsResult(Map<org.apache.kafka.common.TopicPartition, org.apache.kafka.clients.consumer.OffsetAndMetadata> partitionOffsets) static org.apache.kafka.clients.admin.ListShareGroupOffsetsResultcreateListShareGroupOffsetsResult(Map<String, org.apache.kafka.common.KafkaFuture<Map<org.apache.kafka.common.TopicPartition, org.apache.kafka.clients.admin.SharePartitionOffsetInfo>>> groupOffsets) static org.apache.kafka.clients.admin.CreatePartitionsResultcreatePartitionsResult(String topic, Throwable t) Helper to create a CreatePartitionsResult instance for a given Throwable.static org.apache.kafka.clients.admin.CreateTopicsResultcreateTopicsResult(String topic, Throwable t) Helper to create a CreateTopicsResult instance for a given Throwable.static org.apache.kafka.clients.admin.DeleteTopicsResultdeleteTopicsResult(String topic, Throwable t) Helper to create a DeleteTopicsResult instance for a given Throwable.static org.apache.kafka.clients.admin.DescribeConfigsResultdescribeConfigsResult(org.apache.kafka.common.config.ConfigResource cr, org.apache.kafka.clients.admin.Config config) Helper to create a DescribeConfigsResult instance for a given ConfigResource.static org.apache.kafka.clients.admin.DescribeTopicsResultdescribeTopicsResult(String topic, org.apache.kafka.clients.admin.TopicDescription description) Helper to create a DescribeTopicsResult instance for a given topic.static org.apache.kafka.clients.admin.DescribeTopicsResultdescribeTopicsResult(Map<String, org.apache.kafka.clients.admin.TopicDescription> topicDescriptions) static org.apache.kafka.clients.admin.DescribeTopicsResultdescribeTopicsResultWithException(String topic, Throwable e) static org.apache.kafka.clients.admin.ListConfigResourcesResultlistConfigResourcesResult(String... names) static org.apache.kafka.clients.admin.ListConfigResourcesResultlistConfigResourcesResult(Map<org.apache.kafka.common.config.ConfigResource.Type, Set<String>> resourceNames) static org.apache.kafka.clients.admin.ListConfigResourcesResultlistConfigResourcesResult(org.apache.kafka.common.KafkaException exception) static org.apache.kafka.clients.admin.ListConsumerGroupOffsetsResultlistConsumerGroupOffsetsResult(String group, org.apache.kafka.common.KafkaException exception) static org.apache.kafka.clients.admin.ListConsumerGroupOffsetsResultlistConsumerGroupOffsetsResult(Map<String, Map<org.apache.kafka.common.TopicPartition, org.apache.kafka.clients.consumer.OffsetAndMetadata>> offsets) static org.apache.kafka.clients.admin.ListGroupsResultlistGroupsResult(org.apache.kafka.clients.admin.GroupListing... groups) static org.apache.kafka.clients.admin.ListGroupsResultlistGroupsResult(org.apache.kafka.common.KafkaException exception) static org.apache.kafka.clients.admin.ListPartitionReassignmentsResultHelper to create a ListPartitionReassignmentsResult instance for a given Throwable.static org.apache.kafka.clients.admin.ListTopicsResultlistTopicsResult(String topic) Helper to create a ListTopicsResult instance for a given topic.
-
Constructor Details
-
AdminClientTestUtils
public AdminClientTestUtils()
-
-
Method Details
-
listPartitionReassignmentsResult
public static org.apache.kafka.clients.admin.ListPartitionReassignmentsResult listPartitionReassignmentsResult(Throwable t) Helper to create a ListPartitionReassignmentsResult instance for a given Throwable. ListPartitionReassignmentsResult's constructor is only accessible from within the admin package. -
createTopicsResult
-
deleteTopicsResult
-
listTopicsResult
Helper to create a ListTopicsResult instance for a given topic. ListTopicsResult's constructor is only accessible from within the admin package. -
alterConfigsResult
public static org.apache.kafka.clients.admin.AlterConfigsResult alterConfigsResult(org.apache.kafka.common.config.ConfigResource cr, Throwable t) Helper to create a AlterConfigsResult instance for a given Throwable. AlterConfigsResult's constructor is only accessible from within the admin package. -
alterConfigsResult
public static org.apache.kafka.clients.admin.AlterConfigsResult alterConfigsResult(org.apache.kafka.common.config.ConfigResource cr) Helper to create a AlterConfigsResult instance for a given ConfigResource. AlterConfigsResult's constructor is only accessible from within the admin package. -
describeConfigsResult
public static org.apache.kafka.clients.admin.DescribeConfigsResult describeConfigsResult(org.apache.kafka.common.config.ConfigResource cr, org.apache.kafka.clients.admin.Config config) Helper to create a DescribeConfigsResult instance for a given ConfigResource. DescribeConfigsResult's constructor is only accessible from within the admin package. -
createPartitionsResult
-
describeTopicsResult
public static org.apache.kafka.clients.admin.DescribeTopicsResult describeTopicsResult(String topic, org.apache.kafka.clients.admin.TopicDescription description) Helper to create a DescribeTopicsResult instance for a given topic. DescribeTopicsResult's constructor is only accessible from within the admin package. -
describeTopicsResult
-
describeTopicsResultWithException
-
listGroupsResult
public static org.apache.kafka.clients.admin.ListGroupsResult listGroupsResult(org.apache.kafka.clients.admin.GroupListing... groups) -
listGroupsResult
public static org.apache.kafka.clients.admin.ListGroupsResult listGroupsResult(org.apache.kafka.common.KafkaException exception) -
listConsumerGroupOffsetsResult
-
listConsumerGroupOffsetsResult
public static org.apache.kafka.clients.admin.ListConsumerGroupOffsetsResult listConsumerGroupOffsetsResult(String group, org.apache.kafka.common.KafkaException exception) -
listConfigResourcesResult
-
listConfigResourcesResult
public static org.apache.kafka.clients.admin.ListConfigResourcesResult listConfigResourcesResult(String... names) -
listConfigResourcesResult
public static org.apache.kafka.clients.admin.ListConfigResourcesResult listConfigResourcesResult(org.apache.kafka.common.KafkaException exception) -
createListOffsetsResult
public static org.apache.kafka.clients.admin.ListOffsetsResult createListOffsetsResult(Map<org.apache.kafka.common.TopicPartition, org.apache.kafka.clients.consumer.OffsetAndMetadata> partitionOffsets) -
brokerHealthStatusResult
public static org.apache.kafka.clients.admin.BrokerHealthStatusResult brokerHealthStatusResult(Integer brokerId, org.apache.kafka.clients.admin.BrokerComponent brokerComponent, org.apache.kafka.clients.admin.ComponentHealthStatus componentHealthStatus) Used for BrokerHealthCommand tests as the constructor is only accessible from within the admin package -
create
-