public class MetadataClient
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MetadataClient.ClusterAndGeneration |
static class |
MetadataClient.ClusterAndPlacements |
Constructor and Description |
---|
MetadataClient(KafkaCruiseControlConfig config,
long metadataTTLMs,
org.apache.kafka.common.utils.Time time) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the admin client.
|
org.apache.kafka.common.Cluster |
cluster()
Get the current cluster.
|
MetadataClient.ClusterAndGeneration |
clusterAndGeneration()
Get the current cluster and generation
|
MetadataClient.ClusterAndGeneration |
forceRefreshMetadata()
Force-refresh metadata, paying no attention to how recently it has been refreshed.
|
MetadataClient.ClusterAndGeneration |
refreshMetadata()
Refresh the metadata.
|
MetadataClient.ClusterAndGeneration |
refreshMetadata(int timeoutMs)
Refresh the metadata, but bound the wait time for the call.
|
MetadataClient.ClusterAndGeneration |
refreshMetadata(int timeoutMs,
boolean force) |
java.util.Map<java.lang.String,kafka.common.TopicPlacement> |
topicPlacements() |
public MetadataClient(KafkaCruiseControlConfig config, long metadataTTLMs, org.apache.kafka.common.utils.Time time)
public MetadataClient.ClusterAndGeneration refreshMetadata()
public MetadataClient.ClusterAndGeneration forceRefreshMetadata()
public MetadataClient.ClusterAndGeneration refreshMetadata(int timeoutMs)
public MetadataClient.ClusterAndGeneration refreshMetadata(int timeoutMs, boolean force)
public void close()
public MetadataClient.ClusterAndGeneration clusterAndGeneration()
public org.apache.kafka.common.Cluster cluster()
public java.util.Map<java.lang.String,kafka.common.TopicPlacement> topicPlacements()