Class AbstractKafkaConsumerService
- java.lang.Object
-
- com.linkedin.venice.service.AbstractVeniceService
-
- com.linkedin.davinci.kafka.consumer.AbstractKafkaConsumerService
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
KafkaConsumerService
,KafkaConsumerServiceDelegator
public abstract class AbstractKafkaConsumerService extends AbstractVeniceService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.linkedin.venice.service.AbstractVeniceService
AbstractVeniceService.ServiceState
-
-
Field Summary
-
Fields inherited from class com.linkedin.venice.service.AbstractVeniceService
logger, serviceState
-
-
Constructor Summary
Constructors Constructor Description AbstractKafkaConsumerService()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract com.linkedin.davinci.kafka.consumer.SharedKafkaConsumer
assignConsumerFor(PubSubTopic versionTopic, PubSubTopicPartition topicPartition)
abstract void
batchUnsubscribe(PubSubTopic versionTopic, java.util.Set<PubSubTopicPartition> topicPartitionsToUnSub)
abstract com.linkedin.davinci.kafka.consumer.SharedKafkaConsumer
getConsumerAssignedToVersionTopicPartition(PubSubTopic versionTopic, PubSubTopicPartition topicPartition)
abstract java.util.Map<PubSubTopicPartition,TopicPartitionIngestionInfo>
getIngestionInfoFromConsumer(PubSubTopic versionTopic, PubSubTopicPartition pubSubTopicPartition)
abstract long
getLatestOffsetBasedOnMetrics(PubSubTopic versionTopic, PubSubTopicPartition pubSubTopicPartition)
abstract long
getMaxElapsedTimeMSSinceLastPollInConsumerPool()
abstract long
getOffsetLagBasedOnMetrics(PubSubTopic versionTopic, PubSubTopicPartition pubSubTopicPartition)
abstract boolean
hasAnySubscriptionFor(PubSubTopic versionTopic)
abstract void
startConsumptionIntoDataReceiver(PartitionReplicaIngestionContext partitionReplicaIngestionContext, long lastReadOffset, ConsumedDataReceiver<java.util.List<PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long>>> consumedDataReceiver)
void
unSubscribe(PubSubTopic versionTopic, PubSubTopicPartition pubSubTopicPartition)
abstract void
unSubscribe(PubSubTopic versionTopic, PubSubTopicPartition pubSubTopicPartition, long timeoutMs)
abstract void
unsubscribeAll(PubSubTopic versionTopic)
-
Methods inherited from class com.linkedin.venice.service.AbstractVeniceService
close, getName, isRunning, start, startInner, stop, stopInner
-
-
-
-
Method Detail
-
getConsumerAssignedToVersionTopicPartition
public abstract com.linkedin.davinci.kafka.consumer.SharedKafkaConsumer getConsumerAssignedToVersionTopicPartition(PubSubTopic versionTopic, PubSubTopicPartition topicPartition)
-
assignConsumerFor
public abstract com.linkedin.davinci.kafka.consumer.SharedKafkaConsumer assignConsumerFor(PubSubTopic versionTopic, PubSubTopicPartition topicPartition)
-
unsubscribeAll
public abstract void unsubscribeAll(PubSubTopic versionTopic)
-
unSubscribe
public void unSubscribe(PubSubTopic versionTopic, PubSubTopicPartition pubSubTopicPartition)
-
unSubscribe
public abstract void unSubscribe(PubSubTopic versionTopic, PubSubTopicPartition pubSubTopicPartition, long timeoutMs)
-
batchUnsubscribe
public abstract void batchUnsubscribe(PubSubTopic versionTopic, java.util.Set<PubSubTopicPartition> topicPartitionsToUnSub)
-
hasAnySubscriptionFor
public abstract boolean hasAnySubscriptionFor(PubSubTopic versionTopic)
-
getMaxElapsedTimeMSSinceLastPollInConsumerPool
public abstract long getMaxElapsedTimeMSSinceLastPollInConsumerPool()
-
startConsumptionIntoDataReceiver
public abstract void startConsumptionIntoDataReceiver(PartitionReplicaIngestionContext partitionReplicaIngestionContext, long lastReadOffset, ConsumedDataReceiver<java.util.List<PubSubMessage<KafkaKey,KafkaMessageEnvelope,java.lang.Long>>> consumedDataReceiver)
-
getOffsetLagBasedOnMetrics
public abstract long getOffsetLagBasedOnMetrics(PubSubTopic versionTopic, PubSubTopicPartition pubSubTopicPartition)
-
getLatestOffsetBasedOnMetrics
public abstract long getLatestOffsetBasedOnMetrics(PubSubTopic versionTopic, PubSubTopicPartition pubSubTopicPartition)
-
getIngestionInfoFromConsumer
public abstract java.util.Map<PubSubTopicPartition,TopicPartitionIngestionInfo> getIngestionInfoFromConsumer(PubSubTopic versionTopic, PubSubTopicPartition pubSubTopicPartition)
-
-