Interface ClusterActuator
public interface ClusterActuator
-
Method Summary
Modifier and TypeMethodDescriptionaddBroker(int brokerId) Request that the broker is added to the cluster.addBrokerInvalidType(String brokerId) Request that the broker is added to the cluster.cancelChange(long changeId) Queries the current cluster topologyjoinPartition(int brokerId, int partitionId, int priority) Request that the broker joins the partition with the given priority.leavePartition(int brokerId, int partitionId) Request that the broker leaves the partition.static ClusterActuatorof(TestApplication<?> node) Returns aClusterActuatorinstance using the given node as upstream.static ClusterActuatorof(io.zeebe.containers.ZeebeNode<?> node) Returns aClusterActuatorinstance using the given node as upstream.static ClusterActuatorReturns aClusterActuatorinstance using the given endpoint as upstream.static ClusterActuatorReturns aClusterActuatorinstance using the given address as upstream.removeBroker(int brokerId) Request that the broker is removed from the clusterscaleBrokers(List<Integer> ids) Scales the given brokers up or down and reassigns partitions to the new brokers.scaleBrokers(List<Integer> ids, boolean dryRun) Scales the given brokers up or down and reassigns partitions to the new brokers.scaleBrokers(List<Integer> ids, boolean dryRun, boolean force) Scales the given brokers up or down and reassigns partitions to the new brokers.scaleBrokers(List<Integer> ids, int newReplicationFactor) Scales the given brokers up or down and reassigns partitions to the new brokers based on new replication factor.
-
Method Details
-
of
Returns aClusterActuatorinstance using the given node as upstream.- Parameters:
node- the node to connect to- Returns:
- a new instance of
ClusterActuator
-
of
Returns aClusterActuatorinstance using the given node as upstream.- Parameters:
node- the node to connect to- Returns:
- a new instance of
ClusterActuator
-
ofAddress
Returns aClusterActuatorinstance using the given address as upstream.- Parameters:
address- the monitoring address- Returns:
- a new instance of
ClusterActuator
-
of
Returns aClusterActuatorinstance using the given endpoint as upstream.- Parameters:
endpoint- the endpoint to connect to- Returns:
- a new instance of
ClusterActuator
-
joinPartition
Request that the broker joins the partition with the given priority.- Throws:
feign.FeignException- if the request is not successful (e.g. 4xx or 5xx)
-
leavePartition
Request that the broker leaves the partition.- Throws:
feign.FeignException- if the request is not successful (e.g. 4xx or 5xx)
-
getTopology
GetTopologyResponse getTopology()Queries the current cluster topology- Throws:
feign.FeignException- if the request is not successful (e.g. 4xx or 5xx)
-
scaleBrokers
Scales the given brokers up or down and reassigns partitions to the new brokers.- Parameters:
ids-- Throws:
feign.FeignException- if the request is not successful (e.g. 4xx or 5xx)
-
scaleBrokers
Scales the given brokers up or down and reassigns partitions to the new brokers based on new replication factor.- Parameters:
ids-newReplicationFactor- new replication factor after scaling, if invalid input: '<'=0 use the current value- Throws:
feign.FeignException- if the request is not successful (e.g. 4xx or 5xx)
-
scaleBrokers
Scales the given brokers up or down and reassigns partitions to the new brokers.- Parameters:
dryRun- if true, changes are not applied but only simulated.- Throws:
feign.FeignException- if the request is not successful (e.g. 4xx or 5xx)
-
scaleBrokers
Scales the given brokers up or down and reassigns partitions to the new brokers.- Parameters:
dryRun- if true, changes are not applied but only simulated.force- if true, the brokers that are not specified will be forcely removed.- Throws:
feign.FeignException- if the request is not successful (e.g. 4xx or 5xx)
-
addBroker
Request that the broker is added to the cluster.- Throws:
feign.FeignException- if the request is not successful (e.g. 4xx or 5xx)
-
removeBroker
Request that the broker is removed from the cluster- Throws:
feign.FeignException- if the request is not successful (e.g. 4xx or 5xx)
-
cancelChange
-
scaleBrokersInvalidType
-
addBrokerInvalidType
Request that the broker is added to the cluster.- Throws:
feign.FeignException- if the request is not successful (e.g. 4xx or 5xx)
-