public class KafkaSupervisor extends Object implements Supervisor
KafkaSupervisorSpec
which includes the Kafka topic and configuration as well as an ingestion spec which will
be used to generate the indexing tasks. The run loop periodically refreshes its view of the Kafka topic's partitions
and the list of running indexing tasks and ensures that all partitions are being read from and that there are enough
tasks to satisfy the desired number of replicas. As tasks complete, new tasks are queued to process the next range of
Kafka offsets.Constructor and Description |
---|
KafkaSupervisor(TaskStorage taskStorage,
TaskMaster taskMaster,
IndexerMetadataStorageCoordinator indexerMetadataStorageCoordinator,
KafkaIndexTaskClientFactory taskClientFactory,
com.fasterxml.jackson.databind.ObjectMapper mapper,
KafkaSupervisorSpec spec) |
Modifier and Type | Method and Description |
---|---|
SupervisorReport |
getStatus() |
void |
possiblyRegisterListener() |
void |
reset(DataSourceMetadata dataSourceMetadata) |
void |
start() |
void |
stop(boolean stopGracefully) |
public KafkaSupervisor(TaskStorage taskStorage, TaskMaster taskMaster, IndexerMetadataStorageCoordinator indexerMetadataStorageCoordinator, KafkaIndexTaskClientFactory taskClientFactory, com.fasterxml.jackson.databind.ObjectMapper mapper, KafkaSupervisorSpec spec)
public void start()
start
in interface Supervisor
public void stop(boolean stopGracefully)
stop
in interface Supervisor
stopGracefully
- If true, supervisor will cleanly shutdown managed tasks if possible (for example signalling
them to publish their segments and exit). The implementation may block until the tasks have
either acknowledged or completed. If false, supervisor will stop immediately and leave any
running tasks as they are.public SupervisorReport getStatus()
getStatus
in interface Supervisor
public void reset(DataSourceMetadata dataSourceMetadata)
reset
in interface Supervisor
public void possiblyRegisterListener()
Copyright © 2011–2017. All rights reserved.