Class KafkaPartitionDiscoverer
java.lang.Object
org.apache.flink.streaming.connectors.kafka.internals.AbstractPartitionDiscoverer
org.apache.flink.streaming.connectors.kafka.internals.KafkaPartitionDiscoverer
Deprecated.
A partition discoverer that can be used to discover topics and partitions metadata from Kafka
brokers via the Kafka high-level consumer API.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.flink.streaming.connectors.kafka.internals.AbstractPartitionDiscoverer
AbstractPartitionDiscoverer.ClosedException, AbstractPartitionDiscoverer.WakeupException -
Constructor Summary
ConstructorsConstructorDescriptionKafkaPartitionDiscoverer(KafkaTopicsDescriptor topicsDescriptor, int indexOfThisSubtask, int numParallelSubtasks, Properties kafkaProperties) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDeprecated.Close all established connections.protected List<KafkaTopicPartition> getAllPartitionsForTopics(List<String> topics) Deprecated.Fetch the list of all partitions for a specific topics list from Kafka.Deprecated.Fetch the list of all topics from Kafka.protected voidDeprecated.Establish the required connections in order to fetch topics and partitions metadata.protected voidDeprecated.Attempt to eagerly wakeup from blocking calls to Kafka inAbstractPartitionDiscoverer.getAllTopics()andAbstractPartitionDiscoverer.getAllPartitionsForTopics(List).Methods inherited from class org.apache.flink.streaming.connectors.kafka.internals.AbstractPartitionDiscoverer
close, discoverPartitions, open, setAndCheckDiscoveredPartition, wakeup
-
Constructor Details
-
KafkaPartitionDiscoverer
public KafkaPartitionDiscoverer(KafkaTopicsDescriptor topicsDescriptor, int indexOfThisSubtask, int numParallelSubtasks, Properties kafkaProperties) Deprecated.
-
-
Method Details
-
initializeConnections
protected void initializeConnections()Deprecated.Description copied from class:AbstractPartitionDiscovererEstablish the required connections in order to fetch topics and partitions metadata.- Specified by:
initializeConnectionsin classAbstractPartitionDiscoverer
-
getAllTopics
Deprecated.Description copied from class:AbstractPartitionDiscovererFetch the list of all topics from Kafka.- Specified by:
getAllTopicsin classAbstractPartitionDiscoverer- Throws:
AbstractPartitionDiscoverer.WakeupException
-
getAllPartitionsForTopics
protected List<KafkaTopicPartition> getAllPartitionsForTopics(List<String> topics) throws AbstractPartitionDiscoverer.WakeupException, RuntimeException Deprecated.Description copied from class:AbstractPartitionDiscovererFetch the list of all partitions for a specific topics list from Kafka.- Specified by:
getAllPartitionsForTopicsin classAbstractPartitionDiscoverer- Throws:
AbstractPartitionDiscoverer.WakeupExceptionRuntimeException
-
wakeupConnections
protected void wakeupConnections()Deprecated.Description copied from class:AbstractPartitionDiscovererAttempt to eagerly wakeup from blocking calls to Kafka inAbstractPartitionDiscoverer.getAllTopics()andAbstractPartitionDiscoverer.getAllPartitionsForTopics(List).If the invocation indeed results in interrupting an actual blocking Kafka call, the implementations of
AbstractPartitionDiscoverer.getAllTopics()andAbstractPartitionDiscoverer.getAllPartitionsForTopics(List)are responsible of throwing aAbstractPartitionDiscoverer.WakeupException.- Specified by:
wakeupConnectionsin classAbstractPartitionDiscoverer
-
closeConnections
Deprecated.Description copied from class:AbstractPartitionDiscovererClose all established connections.- Specified by:
closeConnectionsin classAbstractPartitionDiscoverer- Throws:
Exception
-