Class AdminConsumerService
- java.lang.Object
-
- com.linkedin.venice.service.AbstractVeniceService
-
- com.linkedin.venice.controller.kafka.consumer.AdminConsumerService
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class AdminConsumerService extends AbstractVeniceService
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
Constructors Constructor Description AdminConsumerService(VeniceHelixAdmin admin, VeniceControllerClusterConfig config, io.tehuti.metrics.MetricsRepository metricsRepository, PubSubTopicRepository pubSubTopicRepository, PubSubMessageDeserializer pubSubMessageDeserializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Long>
getAdminTopicMetadata(java.lang.String clusterName)
PubSubMessageDeserializer
getDeserializer()
long
getFailingOffset()
java.lang.Exception
getLastExceptionForStore(java.lang.String storeName)
Get the encountered exception during admin message consumption for the given store.java.lang.Long
getLastSucceededExecutionId(java.lang.String storeName)
Get the last succeeded execution id for the given store.java.lang.Long
getLastSucceededExecutionIdInCluster(java.lang.String clusterName)
Get the last succeeded execution id for the given cluster.void
setOffsetToSkip(java.lang.String clusterName, long offset, boolean skipDIV)
Skip admin message with specified offset for the given cluster.boolean
startInner()
void
stopInner()
void
updateAdminTopicMetadata(java.lang.String clusterName, long executionId, long offset, long upstreamOffset)
Update cluster-level execution id, offset, and upstream offset in a child colo.
-
-
-
Constructor Detail
-
AdminConsumerService
public AdminConsumerService(VeniceHelixAdmin admin, VeniceControllerClusterConfig config, io.tehuti.metrics.MetricsRepository metricsRepository, PubSubTopicRepository pubSubTopicRepository, PubSubMessageDeserializer pubSubMessageDeserializer)
-
-
Method Detail
-
startInner
public boolean startInner() throws java.lang.Exception
- 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:
java.lang.Exception
-
stopInner
public void stopInner() throws java.lang.Exception
- Specified by:
stopInner
in classAbstractVeniceService
- Throws:
java.lang.Exception
-
setOffsetToSkip
public void setOffsetToSkip(java.lang.String clusterName, long offset, boolean skipDIV)
Skip admin message with specified offset for the given cluster.
-
getLastSucceededExecutionIdInCluster
public java.lang.Long getLastSucceededExecutionIdInCluster(java.lang.String clusterName)
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
public java.lang.Long getLastSucceededExecutionId(java.lang.String storeName)
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
public java.lang.Exception getLastExceptionForStore(java.lang.String storeName)
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
public java.util.Map<java.lang.String,java.lang.Long> getAdminTopicMetadata(java.lang.String clusterName)
- Returns:
- cluster-level execution id, offset, and upstream offset in a child colo.
-
updateAdminTopicMetadata
public void updateAdminTopicMetadata(java.lang.String clusterName, long executionId, long offset, long upstreamOffset)
Update cluster-level execution id, offset, and upstream offset in a child colo.
-
getDeserializer
public PubSubMessageDeserializer getDeserializer()
-
-