Class KafkaPartitionDiscoverer
- java.lang.Object
-
- org.apache.flink.streaming.connectors.kafka.internals.AbstractPartitionDiscoverer
-
- org.apache.flink.streaming.connectors.kafka.internals.KafkaPartitionDiscoverer
-
@Internal @Deprecated public class KafkaPartitionDiscoverer extends AbstractPartitionDiscoverer
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
Constructors Constructor Description KafkaPartitionDiscoverer(KafkaTopicsDescriptor topicsDescriptor, int indexOfThisSubtask, int numParallelSubtasks, Properties kafkaProperties)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcloseConnections()Deprecated.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.protected List<String>getAllTopics()Deprecated.Fetch the list of all topics from Kafka.protected voidinitializeConnections()Deprecated.Establish the required connections in order to fetch topics and partitions metadata.protected voidwakeupConnections()Deprecated.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 Detail
-
KafkaPartitionDiscoverer
public KafkaPartitionDiscoverer(KafkaTopicsDescriptor topicsDescriptor, int indexOfThisSubtask, int numParallelSubtasks, Properties kafkaProperties)
Deprecated.
-
-
Method Detail
-
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
protected List<String> getAllTopics() throws AbstractPartitionDiscoverer.WakeupException
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
protected void closeConnections() throws ExceptionDeprecated.Description copied from class:AbstractPartitionDiscovererClose all established connections.- Specified by:
closeConnectionsin classAbstractPartitionDiscoverer- Throws:
Exception
-
-