Class RaftClusterInvocationContext.RaftClusterInstance
java.lang.Object
org.apache.kafka.common.test.junit.RaftClusterInvocationContext.RaftClusterInstance
- All Implemented Interfaces:
ClusterInstance
- Enclosing class:
RaftClusterInvocationContext
public static class RaftClusterInvocationContext.RaftClusterInstance
extends Object
implements ClusterInstance
-
Method Summary
Modifier and TypeMethodDescriptionkafka.network.SocketServerkafka.network.SocketServerThe broker connect string which can be used by clients for bootstrapping to the controller quorum.The broker connect string which can be used by clients for bootstrappingbrokers()org.apache.kafka.common.network.ListenerNameThe listener for this cluster as configured byClusterTestor byClusterConfig.org.apache.kafka.common.test.api.ClusterConfigconfig()The immutable cluster configuration used to create this cluster.Return the set of all controller IDs configured for this test.org.apache.kafka.common.network.ListenerNameorg.apache.kafka.common.network.ListenerNameThe listener for the kraft cluster controller configured by controller.listener.names.Collection<kafka.network.SocketServer> A collection of all controllers in the cluster.duplicateCluster(Consumer<org.apache.kafka.common.test.api.ClusterConfig.Builder> builderConsumer) Optional<org.apache.kafka.server.fault.FaultHandlerException> Returns the first recorded fatal exception, if any.Optional<org.apache.kafka.server.fault.FaultHandlerException> Return the first recorded non-fatal exception, if any.voidformat()scala.Option<CompletableFuture<Integer>> voidkafka.network.SocketServerlinkCoordinator(String linkName) voidvoidshutdownBroker(int brokerId) voidstart()voidstartBroker(int brokerId) booleanstarted()voidstop()booleanstopped()org.apache.kafka.common.test.api.Typetype()voidMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.kafka.common.test.ClusterInstance
admin, admin, admin, aliveBrokers, anyBrokerSocketServer, anyControllerSocketServer, authorizers, brokerIds, brokerSocketServers, consumer, consumer, createTopic, createTopic, deleteTopic, getLeaderBrokerId, producer, producer, setClientSaslConfig, shareConsumer, shareConsumer, supportedGroupProtocols, waitAcls, waitForTopic, waitTopicDeletion
-
Method Details
-
bootstrapServers
Description copied from interface:ClusterInstanceThe broker connect string which can be used by clients for bootstrapping- Specified by:
bootstrapServersin interfaceClusterInstance
-
bootstrapControllers
Description copied from interface:ClusterInstanceThe broker connect string which can be used by clients for bootstrapping to the controller quorum.- Specified by:
bootstrapControllersin interfaceClusterInstance
-
clientListener
public org.apache.kafka.common.network.ListenerName clientListener()Description copied from interface:ClusterInstanceThe listener for this cluster as configured byClusterTestor byClusterConfig. If unspecified by those sources, this will return the listener for the default security protocol PLAINTEXT- Specified by:
clientListenerin interfaceClusterInstance
-
controllerListener
public org.apache.kafka.common.network.ListenerName controllerListener()- Specified by:
controllerListenerin interfaceClusterInstance
-
controllerListenerName
public org.apache.kafka.common.network.ListenerName controllerListenerName()Description copied from interface:ClusterInstanceThe listener for the kraft cluster controller configured by controller.listener.names.- Specified by:
controllerListenerNamein interfaceClusterInstance
-
controllerSocketServers
Description copied from interface:ClusterInstanceA collection of all controllers in the cluster.- Specified by:
controllerSocketServersin interfaceClusterInstance
-
anyNonControllerBrokerSocketServer
public kafka.network.SocketServer anyNonControllerBrokerSocketServer()- Specified by:
anyNonControllerBrokerSocketServerin interfaceClusterInstance
-
activeController
- Specified by:
activeControllerin interfaceClusterInstance- Throws:
InterruptedException
-
linkCoordinator
- Specified by:
linkCoordinatorin interfaceClusterInstance
-
clusterId
- Specified by:
clusterIdin interfaceClusterInstance
-
type
public org.apache.kafka.common.test.api.Type type()- Specified by:
typein interfaceClusterInstance
-
config
public org.apache.kafka.common.test.api.ClusterConfig config()Description copied from interface:ClusterInstanceThe immutable cluster configuration used to create this cluster.- Specified by:
configin interfaceClusterInstance
-
controllerIds
Description copied from interface:ClusterInstanceReturn the set of all controller IDs configured for this test. For kraft, this will return only the nodes which have the "controller" role enabled in `process.roles`.- Specified by:
controllerIdsin interfaceClusterInstance
-
getUnderlying
-
duplicateCluster
public RaftClusterInvocationContext.RaftClusterInstance duplicateCluster(Consumer<org.apache.kafka.common.test.api.ClusterConfig.Builder> builderConsumer) - Specified by:
duplicateClusterin interfaceClusterInstance
-
start
public void start()- Specified by:
startin interfaceClusterInstance
-
started
public boolean started()- Specified by:
startedin interfaceClusterInstance
-
stop
public void stop()- Specified by:
stopin interfaceClusterInstance
-
stopped
public boolean stopped()- Specified by:
stoppedin interfaceClusterInstance
-
shutdownBroker
public void shutdownBroker(int brokerId) - Specified by:
shutdownBrokerin interfaceClusterInstance
-
startBroker
public void startBroker(int brokerId) - Specified by:
startBrokerin interfaceClusterInstance
-
firstFatalException
Description copied from interface:ClusterInstanceReturns the first recorded fatal exception, if any.- Specified by:
firstFatalExceptionin interfaceClusterInstance
-
firstNonFatalException
Description copied from interface:ClusterInstanceReturn the first recorded non-fatal exception, if any.- Specified by:
firstNonFatalExceptionin interfaceClusterInstance
-
waitForReadyBrokers
- Specified by:
waitForReadyBrokersin interfaceClusterInstance- Throws:
InterruptedException
-
brokersMap
- Specified by:
brokersMapin interfaceClusterInstance
-
rollingBrokerRestart
public void rollingBrokerRestart()- Specified by:
rollingBrokerRestartin interfaceClusterInstance
-
killAllBrokers
public void killAllBrokers()- Specified by:
killAllBrokersin interfaceClusterInstance
-
metadataImage
-
brokers
- Specified by:
brokersin interfaceClusterInstance
-
controllers
- Specified by:
controllersin interfaceClusterInstance
-
format
-
interBrokerPortFuture
-