Class AdminConsumerService
java.lang.Object
com.linkedin.venice.service.AbstractVeniceService
com.linkedin.venice.controller.kafka.consumer.AdminConsumerService
- All Implemented Interfaces:
Closeable
,AutoCloseable
One consumer service for one cluster.
-
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
ConstructorDescriptionAdminConsumerService
(VeniceHelixAdmin admin, VeniceControllerClusterConfig config, io.tehuti.metrics.MetricsRepository metricsRepository, PubSubTopicRepository pubSubTopicRepository, PubSubMessageDeserializer pubSubMessageDeserializer) -
Method Summary
Modifier and TypeMethodDescriptiongetAdminTopicMetadata
(String clusterName) long
getLastExceptionForStore
(String storeName) Get the encountered exception during admin message consumption for the given store.getLastSucceededExecutionId
(String storeName) Get the last succeeded execution id for the given store.getLastSucceededExecutionIdInCluster
(String clusterName) Get the last succeeded execution id for the given cluster.void
setOffsetToSkip
(String clusterName, long offset, boolean skipDIV) Skip admin message with specified offset for the given cluster.boolean
void
void
updateAdminTopicMetadata
(String clusterName, long executionId, long offset, long upstreamOffset) Update cluster-level execution id, offset, and upstream offset in a child colo.
-
Constructor Details
-
AdminConsumerService
public AdminConsumerService(VeniceHelixAdmin admin, VeniceControllerClusterConfig config, io.tehuti.metrics.MetricsRepository metricsRepository, PubSubTopicRepository pubSubTopicRepository, PubSubMessageDeserializer pubSubMessageDeserializer)
-
-
Method Details
-
startInner
- Specified by:
startInner
in classAbstractVeniceService
- Returns:
- true if the service is completely started,
false if it is still starting asynchronously (in this case, it is the implementer's
responsibility to set
AbstractVeniceService.serviceState
toAbstractVeniceService.ServiceState.STARTED
upon completion of the async work). - Throws:
Exception
-
stopInner
- Specified by:
stopInner
in classAbstractVeniceService
- Throws:
Exception
-
setOffsetToSkip
Skip admin message with specified offset for the given cluster. -
getLastSucceededExecutionIdInCluster
Get the last succeeded execution id for the given cluster.- Parameters:
clusterName
- name of the Venice cluster.- Returns:
- last succeeded execution id for the given cluster.
-
getLastSucceededExecutionId
Get the last succeeded execution id for the given store.- Parameters:
storeName
- name of the store.- Returns:
- last succeeded execution id for the given store.
-
getLastExceptionForStore
Get the encountered exception during admin message consumption for the given store.- Parameters:
storeName
- name of the store.- Returns:
- last encountered exception.
-
getFailingOffset
public long getFailingOffset()- Returns:
- The first or the smallest failing offset.
-
getAdminTopicMetadata
- Returns:
- cluster-level execution id, offset, and upstream offset in a child colo.
-
updateAdminTopicMetadata
public void updateAdminTopicMetadata(String clusterName, long executionId, long offset, long upstreamOffset) Update cluster-level execution id, offset, and upstream offset in a child colo. -
getDeserializer
-