Search in sources :

Example 1 with KafkaTopic

use of org.apache.gobblin.source.extractor.extract.kafka.KafkaTopic in project incubator-gobblin by apache.

the class Kafka08ConsumerClient method getTopics.

@Override
public List<KafkaTopic> getTopics() {
    List<TopicMetadata> topicMetadataList = getFilteredMetadataList();
    List<KafkaTopic> filteredTopics = Lists.newArrayList();
    for (TopicMetadata topicMetadata : topicMetadataList) {
        List<KafkaPartition> partitions = getPartitionsForTopic(topicMetadata);
        filteredTopics.add(new KafkaTopic(topicMetadata.topic(), partitions));
    }
    return filteredTopics;
}
Also used : KafkaTopic(org.apache.gobblin.source.extractor.extract.kafka.KafkaTopic) KafkaPartition(org.apache.gobblin.source.extractor.extract.kafka.KafkaPartition) TopicMetadata(kafka.javaapi.TopicMetadata)

Aggregations

TopicMetadata (kafka.javaapi.TopicMetadata)1 KafkaPartition (org.apache.gobblin.source.extractor.extract.kafka.KafkaPartition)1 KafkaTopic (org.apache.gobblin.source.extractor.extract.kafka.KafkaTopic)1