public class OnDemandAuditJobOrchestrator extends Object
Constructor and Description |
---|
OnDemandAuditJobOrchestrator(Boolean forceStart,
Boolean compactionCheckNeeded) |
Modifier and Type | Method and Description |
---|---|
void |
getAuditJobStatus(Optional<Integer> brokerId,
boolean detail,
int auditJobId)
Gets status for most recent audit job
|
protected void |
setAdminClient(org.apache.kafka.clients.admin.AdminClient adminClient) |
protected void |
setHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient) |
void |
startOnDemandAuditJobBasedOnConfig(String topicPartitionConfigFile)
Starts on demand audit job for the topic partitions in topicPartitionConfigFile
|
void |
startOnDemandAuditJobForBroker(int brokerId)
Starts audit jon for all partitions on a broker
|
void |
startOnDemandAuditJobForCluster()
Starts audit job on all brokers within the cluster
|
void |
startOnDemandAuditJobForTopic(String topicName)
Starts audit job for a given topic
|
void |
startOnDemandJobForTopicPartition(String topicName,
Set<Integer> partitionsToAudit)
Starts audit job for a given topic and set of partitions
|
void |
startOnDemandJobForTopicPartitionOnBroker(String topicName,
Set<Integer> partitionsToAudit,
int brokerId)
Starts audit job on the given broker for a topic and partition
|
void |
stopAuditJobs()
Stops audit job running currently running in the cluster
|
protected void setHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient)
protected void setAdminClient(org.apache.kafka.clients.admin.AdminClient adminClient)
public void startOnDemandAuditJobBasedOnConfig(String topicPartitionConfigFile) throws ExecutionException, InterruptedException, com.fasterxml.jackson.core.JsonProcessingException
topicPartitionConfigFile
- is the topic partition config fileExecutionException
- is thrown by admin clientInterruptedException
- is thrown by admin clientcom.fasterxml.jackson.core.JsonProcessingException
public void startOnDemandAuditJobForCluster() throws ExecutionException, InterruptedException, com.fasterxml.jackson.core.JsonProcessingException
ExecutionException
- is thrown by admin clientInterruptedException
- is thrown by admin clientcom.fasterxml.jackson.core.JsonProcessingException
public void startOnDemandAuditJobForBroker(int brokerId) throws ExecutionException, InterruptedException, com.fasterxml.jackson.core.JsonProcessingException
brokerId
- is broker id to run audit jobExecutionException
- is thrown by admin clientInterruptedException
- is thrown by admin clientcom.fasterxml.jackson.core.JsonProcessingException
public void startOnDemandAuditJobForTopic(String topicName) throws ExecutionException, InterruptedException, com.fasterxml.jackson.core.JsonProcessingException
topicName
- is the topic nameExecutionException
- is thrown by admin clientInterruptedException
- is thrown by admin clientcom.fasterxml.jackson.core.JsonProcessingException
public void startOnDemandJobForTopicPartition(String topicName, Set<Integer> partitionsToAudit) throws ExecutionException, InterruptedException, com.fasterxml.jackson.core.JsonProcessingException
topicName
- is the topic namepartitionsToAudit
- is set of partitions to audit, if empty, starts audit for all partitionsExecutionException
- is thrown by admin clientInterruptedException
- is thrown by admin clientcom.fasterxml.jackson.core.JsonProcessingException
public void startOnDemandJobForTopicPartitionOnBroker(String topicName, Set<Integer> partitionsToAudit, int brokerId) throws ExecutionException, InterruptedException, com.fasterxml.jackson.core.JsonProcessingException
topicName
- is the topic namepartitionsToAudit
- is set of partitions to auditbrokerId
- is the broker idExecutionException
- is thrown by admin clientInterruptedException
- is thrown by admin clientcom.fasterxml.jackson.core.JsonProcessingException
public void getAuditJobStatus(Optional<Integer> brokerId, boolean detail, int auditJobId) throws ExecutionException, InterruptedException, IOException
brokerId
- is optional argument, specified if needed to retrieve status from given brokerdetail
- is specified if only detail status is neededauditJobId
- is the audit job idExecutionException
- is thrown by admin clientInterruptedException
- is thrown by admin clientIOException
public void stopAuditJobs() throws ExecutionException, InterruptedException, com.fasterxml.jackson.core.JsonProcessingException
ExecutionException
- is thrown by admin clientInterruptedException
- is thrown by admin clientcom.fasterxml.jackson.core.JsonProcessingException