Class KafkaTopicPartitionsSource
java.lang.Object
com.markosindustries.distroboy.kafka.KafkaTopicPartitionsSource
- All Implemented Interfaces:
com.markosindustries.distroboy.core.operations.DataSource<List<org.apache.kafka.common.TopicPartition>>
,com.markosindustries.distroboy.core.operations.Operand<List<org.apache.kafka.common.TopicPartition>,
List<List<org.apache.kafka.common.TopicPartition>>>
public class KafkaTopicPartitionsSource
extends Object
implements com.markosindustries.distroboy.core.operations.DataSource<List<org.apache.kafka.common.TopicPartition>>
A
DataSource
which will yield all TopicPartitions available on the Kafka cluster for a
given set of topics.-
Constructor Summary
ConstructorsConstructorDescriptionKafkaTopicPartitionsSource
(Map<String, Object> kafkaConfiguration, Collection<String> topics) -
Method Summary
Modifier and TypeMethodDescriptionlong
com.markosindustries.distroboy.core.iterators.IteratorWithResources<List<org.apache.kafka.common.TopicPartition>>
enumerateRangeOfFullSet
(long startInclusive, long endExclusive) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.markosindustries.distroboy.core.operations.DataSource
collect, dependencies, enumerateRangeForNode
Methods inherited from interface com.markosindustries.distroboy.core.operations.Operand
then
-
Constructor Details
-
KafkaTopicPartitionsSource
- Parameters:
kafkaConfiguration
- AMap
of Configuration needed to instantiate aKafkaConsumer
to communicate with Kafka viatopics
- The set of topics to retrieveTopicPartition
s for
-
-
Method Details
-
countOfFullSet
public long countOfFullSet()- Specified by:
countOfFullSet
in interfacecom.markosindustries.distroboy.core.operations.DataSource<List<org.apache.kafka.common.TopicPartition>>
-
enumerateRangeOfFullSet
public com.markosindustries.distroboy.core.iterators.IteratorWithResources<List<org.apache.kafka.common.TopicPartition>> enumerateRangeOfFullSet(long startInclusive, long endExclusive) - Specified by:
enumerateRangeOfFullSet
in interfacecom.markosindustries.distroboy.core.operations.DataSource<List<org.apache.kafka.common.TopicPartition>>
-