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
ConstructorDescriptionMainIngestionMonitorService
(IsolatedIngestionBackend ingestionBackend, VeniceConfigLoader configLoader) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addIngestionNotifier
(VeniceNotifier ingestionListener) void
addPushStatusNotifier
(VeniceNotifier pushStatusNotifier) void
cleanupTopicPartitionState
(String topicName, int partitionId) void
cleanupTopicState
(String topicName) long
getTopicPartitionCount
(String topicName) getTopicPartitionIngestionStatus
(String topicName, int partitionId) void
setMetricsRepository
(io.tehuti.metrics.MetricsRepository metricsRepository) void
setStorageMetadataService
(MainIngestionStorageMetadataService storageMetadataService) void
setStoreIngestionService
(KafkaStoreIngestionService storeIngestionService) void
setVersionPartitionToIsolatedIngestion
(String topicName, int partitionId) void
setVersionPartitionToLocalIngestion
(String topicName, int partitionId) boolean
void
-
Constructor Details
-
MainIngestionMonitorService
public MainIngestionMonitorService(IsolatedIngestionBackend ingestionBackend, VeniceConfigLoader configLoader)
-
-
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
-
addIngestionNotifier
-
getIngestionNotifier
-
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
-