Class MainIngestionMonitorService
java.lang.Object
com.linkedin.venice.service.AbstractVeniceService
com.linkedin.davinci.ingestion.main.MainIngestionMonitorService
- All Implemented Interfaces:
Closeable,AutoCloseable
This class is the listener service in main process which handles various kinds of reports sent from
isolated ingestion service. MainIngestionMonitorService itself is a Netty based server implementation, and the main
report handling logics happens in
MainIngestionReportHandler.
Besides reports handling, it also maintains two executor services to send heartbeat check and collect metrics to/from
child process. Also, it maintains status for all the ongoing/completed topic partition ingestion tasks, which helps
IsolatedIngestionBackend to check which process a topic partition storage is located, as well as status recovery
when child process crashed and restarted.-
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
ConstructorsConstructorDescriptionMainIngestionMonitorService(IsolatedIngestionBackend ingestionBackend, VeniceConfigLoader configLoader) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIngestionNotifier(VeniceNotifier ingestionListener) voidaddPushStatusNotifier(VeniceNotifier pushStatusNotifier) voidcleanupTopicPartitionState(String topicName, int partitionId) voidcleanupTopicState(String topicName) longgetTopicPartitionCount(String topicName) getTopicPartitionIngestionStatus(String topicName, int partitionId) voidsetMetricsRepository(io.tehuti.metrics.MetricsRepository metricsRepository) voidsetStorageMetadataService(MainIngestionStorageMetadataService storageMetadataService) voidsetStoreIngestionService(KafkaStoreIngestionService storeIngestionService) voidsetVersionPartitionToIsolatedIngestion(String topicName, int partitionId) voidsetVersionPartitionToLocalIngestion(String topicName, int partitionId) booleanvoid
-
Constructor Details
-
MainIngestionMonitorService
public MainIngestionMonitorService(IsolatedIngestionBackend ingestionBackend, VeniceConfigLoader configLoader)
-
-
Method Details
-
startInner
- Specified by:
startInnerin 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.serviceStatetoAbstractVeniceService.ServiceState.STARTEDupon completion of the async work). - Throws:
Exception
-
stopInner
- Specified by:
stopInnerin classAbstractVeniceService- Throws:
Exception
-
addIngestionNotifier
-
getIngestionNotifier
-
getPubSubPositionDeserializer
-
addPushStatusNotifier
-
getPushStatusNotifierList
-
setMetricsRepository
public void setMetricsRepository(io.tehuti.metrics.MetricsRepository metricsRepository) -
setStorageMetadataService
-
getStorageMetadataService
-
setStoreIngestionService
-
getStoreIngestionService
-
getTopicPartitionIngestionStatus
public MainPartitionIngestionStatus getTopicPartitionIngestionStatus(String topicName, int partitionId) -
setVersionPartitionToLocalIngestion
-
setVersionPartitionToIsolatedIngestion
-
cleanupTopicPartitionState
-
cleanupTopicState
-
getTopicPartitionCount
-
getTopicIngestionStatusMap
-