@Confluent public interface ConfluentAdmin extends Admin
Modifier and Type | Method and Description |
---|---|
AlterMirrorsResult |
alterMirrors(java.util.List<org.apache.kafka.common.requests.AlterMirrorsRequest.Op> ops,
AlterMirrorsOptions options)
Performs a state alteration for topic mirroring.
|
static ConfluentAdmin |
create(java.util.Map<java.lang.String,java.lang.Object> conf)
Create a new ConfluentAdmin with the given configuration.
|
static ConfluentAdmin |
create(java.util.Properties props)
Create a new ConfluentAdmin with the given configuration.
|
CreateAclsResult |
createCentralizedAcls(java.util.Collection<AclBinding> acls,
CreateAclsOptions options,
java.lang.String clusterId,
int writerBrokerId)
Creates access control lists (ACLs) which are bound to specific resources.
|
CreateClusterLinksResult |
createClusterLinks(java.util.Collection<org.apache.kafka.common.requests.NewClusterLink> clusterLinks,
CreateClusterLinksOptions options)
Creates links to remote clusters with the specified configurations for performing inter-cluster
communications.
|
DeleteAclsResult |
deleteCentralizedAcls(java.util.Collection<AclBindingFilter> filters,
DeleteAclsOptions options,
java.lang.String clusterId,
int writerBrokerId)
Deletes access control lists (ACLs) according to the supplied filters.
|
DeleteClusterLinksResult |
deleteClusterLinks(java.util.Collection<java.lang.String> linkNames,
DeleteClusterLinksOptions options)
Deletes established links to remote clusters with the provided link names.
|
default DescribeBrokerRemovalsResult |
describeBrokerRemovals()
Describes all the broker removals in the cluster.
|
DescribeBrokerRemovalsResult |
describeBrokerRemovals(DescribeBrokerRemovalsOptions options)
Describes all the broker removals in the cluster.
|
ListClusterLinksResult |
listClusterLinks(ListClusterLinksOptions options)
Lists the cluster links.
|
default RemoveBrokersResult |
removeBrokers(java.util.List<java.lang.Integer> brokersToRemove)
Drain data off a given set of brokers and remove them from the cluster via shutdown.
|
RemoveBrokersResult |
removeBrokers(java.util.List<java.lang.Integer> brokersToRemove,
RemoveBrokersOptions options)
Drain data off a given set of brokers and remove them from the cluster via shutdown.
|
ReplicaStatusResult |
replicaStatus(java.util.Set<TopicPartition> partitions,
ReplicaStatusOptions options)
Retrieves the status of the replicas for a set of partitions, including observers.
|
WriteTxnMarkerResult |
writeTransactionMarkers(WriteTxnMarkerSpec spec,
java.util.Set<TopicPartition> partitions)
Send transaction markers to a partition.
|
alterClientQuotas, alterClientQuotas, alterConfigs, alterConfigs, alterConsumerGroupOffsets, alterConsumerGroupOffsets, alterPartitionReassignments, alterPartitionReassignments, alterReplicaLogDirs, alterReplicaLogDirs, close, close, close, createAcls, createAcls, createDelegationToken, createDelegationToken, createPartitions, createPartitions, createTopics, createTopics, deleteAcls, deleteAcls, deleteConsumerGroupOffsets, deleteConsumerGroupOffsets, deleteConsumerGroups, deleteConsumerGroups, deleteRecords, deleteRecords, deleteTopics, deleteTopics, describeAcls, describeAcls, describeClientQuotas, describeClientQuotas, describeCluster, describeCluster, describeConfigs, describeConfigs, describeConsumerGroups, describeConsumerGroups, describeDelegationToken, describeDelegationToken, describeLogDirs, describeLogDirs, describeReplicaLogDirs, describeReplicaLogDirs, describeTopics, describeTopics, electLeaders, electLeaders, electPreferredLeaders, electPreferredLeaders, expireDelegationToken, expireDelegationToken, incrementalAlterConfigs, incrementalAlterConfigs, listConsumerGroupOffsets, listConsumerGroupOffsets, listConsumerGroups, listConsumerGroups, listOffsets, listOffsets, listPartitionReassignments, listPartitionReassignments, listPartitionReassignments, listPartitionReassignments, listPartitionReassignments, listTopics, listTopics, metrics, removeMembersFromConsumerGroup, renewDelegationToken, renewDelegationToken
static ConfluentAdmin create(java.util.Properties props)
static ConfluentAdmin create(java.util.Map<java.lang.String,java.lang.Object> conf)
@Confluent ReplicaStatusResult replicaStatus(java.util.Set<TopicPartition> partitions, ReplicaStatusOptions options)
The status of the replicas will be as witnessed by the partition leader. That is, the replicas themselves may be further in progress than what's provided, however the leader has not yet processed that state update.
The following exceptions can be anticipated when calling get()
on the futures obtained from
the returned ReplicaStatusResult
:
TopicAuthorizationException
If the authenticated user didn't have describe access to the Topic.UnknownTopicOrPartitionException
If a given topic or partition does not exist.NotLeaderOrFollowerException
If the partition leader changed while the request was outstanding.TimeoutException
If the request timed out before the controller could retrieve the partition's replica status.partitions
- The partitions to retrieve replica status for.options
- The options to use.@Confluent CreateAclsResult createCentralizedAcls(java.util.Collection<AclBinding> acls, CreateAclsOptions options, java.lang.String clusterId, int writerBrokerId)
This operation is not transactional so it may succeed for some ACLs while fail for others.
If you attempt to add an ACL that duplicates an existing ACL, no error will be raised, but no changes will be made.
This operation is supported by brokers with version 0.11.0.0 or higher.
acls
- The ACLs to createoptions
- The options to use when creating the ACLs.clusterId
- Cluster id for which ACLs are being updatedwriterBrokerId
- Broker id of the current centralized metadata master writer@Confluent DeleteAclsResult deleteCentralizedAcls(java.util.Collection<AclBindingFilter> filters, DeleteAclsOptions options, java.lang.String clusterId, int writerBrokerId)
This operation is not transactional so it may succeed for some ACLs while fail for others.
This operation is supported by brokers with version 0.11.0.0 or higher.
filters
- The filters to use.options
- The options to use when deleting the ACLs.clusterId
- Cluster id for which ACLs are being updatedwriterBrokerId
- Broker id of the current centralized metadata master writer@Confluent default RemoveBrokersResult removeBrokers(java.util.List<java.lang.Integer> brokersToRemove)
describeBrokerRemovals()
Once initiated, the brokers will be shut down and replicas will be reassigned away from them.
This is a convenience method for removeBrokers(List, RemoveBrokersOptions)
with default options. See the overload for more details.
brokersToRemove
- The broker IDs to drain off partition replicas and shut down. Must not be empty.@Confluent RemoveBrokersResult removeBrokers(java.util.List<java.lang.Integer> brokersToRemove, RemoveBrokersOptions options)
describeBrokerRemovals()
Once initiated, the brokers will be shut down and replicas will be reassigned away from them.
The following exceptions can be anticipated when calling get()
on the futures obtained from
the returned RemoveBrokersResult
:
ClusterAuthorizationException
If we didn't have sufficient permission to initiate the broker removal. None of the requests started. TimeoutException
If the request timed out before the controller could initiate the broker removal.
It cannot be guaranteed whether the removal was initiated or not. BalancerOfflineException
If the Confluent Balancer component is disabled or not started yet. BalancerOperationFailedException
If the operation failed during execution of the removal. InsufficientRebalancePlanMetricsException
If computing the rebalance plan for broker removal failed due to insufficient metrics. RebalancePlanComputationException
If computing the rebalance plan for broker removal failed for reasons other than
insufficient metrics like not enough disk space, replication factor same as the cluster size
in case of broker removal etc. InvalidBrokerRemovalException
If requested broker removal operation is invalid, examples being a non-existent
broker ID or some partitions (RF=1) becoming unavailable as a result of the removal. BrokerRemovalInProgressException
If the broker is already being removed. BrokerRemovedException
If the broker was already removed successfully. brokersToRemove
- The broker IDs to drain off partition replicas and shut down. Must not be empty.options
- The options to use for the request.@Confluent default DescribeBrokerRemovalsResult describeBrokerRemovals()
describeBrokerRemovals(DescribeBrokerRemovalsOptions)
with default options. See the overload for more details.@Confluent DescribeBrokerRemovalsResult describeBrokerRemovals(DescribeBrokerRemovalsOptions options)
BrokerRemovalDescription.brokerShutdownStatus()
, a #BrokerRemovalDescription.BrokerShutdownStatus
denoting the status of the shutdown operation
2. #BrokerRemovalDescription.partitionReassignmentsStatus()
, a #BrokerRemovalDescription.PartitionReassignmentsStatus
denoting the status of the partition reassignments operation
When at least one of the two has a failed status, the broker removal operation is considered failed. The user is expected to retry the removal via #removeBrokers(List)
.
When both have a completed status, the broker removal operation is considered a success.
The following exceptions can be anticipated when calling get()
on the futures obtained from
the returned DescribeBrokerRemovalsResult
:
ClusterAuthorizationException
If the authenticated user didn't have DESCRIBE
access to the cluster.TimeoutException
If the request timed out before the controller could describe the removals.options
- The options to use when describing the broker removals.@Confluent CreateClusterLinksResult createClusterLinks(java.util.Collection<org.apache.kafka.common.requests.NewClusterLink> clusterLinks, CreateClusterLinksOptions options)
get()
on the futures obtained from
the returned createClusterLinksResult
:
InvalidClusterLinkException
If the cluster link name is illegal.ClusterAuthorizationException
If the authenticated user didn't have CREATE
access to the cluster.ClusterLinkExistsException
If a cluster link already exists for the provided link name.TimeoutException
If the request timed out before the controller could create the cluster link.clusterLinks
- The cluster links to create.options
- The options to use when creating the cluster links.@Confluent ListClusterLinksResult listClusterLinks(ListClusterLinksOptions options)
The following exceptions can be anticipated when calling get()
on the futures obtained from
the returned listClusterLinksResult
:
ClusterAuthorizationException
If the authenticated user didn't have DESCRIBE_CONFIGS
access to the cluster.TimeoutException
If the request timed out before the controller could list the cluster links.options
- The options to use when listing the cluster links.@Confluent DeleteClusterLinksResult deleteClusterLinks(java.util.Collection<java.lang.String> linkNames, DeleteClusterLinksOptions options)
Deleting a cluster link does not affect the cluster link's data in any way.
The following exceptions can be anticipated when calling get()
on the futures obtained from
the returned deleteClusterLinksResult
:
InvalidClusterLinkException
If the cluster link name is illegal.ClusterAuthorizationException
If the authenticated user didn't have DELETE
access to the cluster.ClusterLinkNotFoundException
If the cluster link to delete doesn't exist.TimeoutException
If the request timed out before the controller could delete the cluster link.linkNames
- The names of the cluster links to delete.options
- The options to use when deleting the cluster links.@Confluent AlterMirrorsResult alterMirrors(java.util.List<org.apache.kafka.common.requests.AlterMirrorsRequest.Op> ops, AlterMirrorsOptions options)
The future of the individual alter mirror ops should be used for obtaining the result.
The following exceptions can be anticipated when calling get()
on the futures obtained from
the returned alterMirrorsResult
:
ClusterAuthorizationException
If the authenticated user didn't have ALTER
access to the cluster.TimeoutException
If the request timed out before the controller could complete the mirror operation.ops
- The mirror alteration operations.options
- The options to use when controlling mirrors.@Confluent WriteTxnMarkerResult writeTransactionMarkers(WriteTxnMarkerSpec spec, java.util.Set<TopicPartition> partitions)