Interface AppenderatorsManager
- All Known Implementing Classes:
DummyForInjectionAppenderatorsManager,PeonAppenderatorsManager,UnifiedIndexerAppenderatorsManager
public interface AppenderatorsManager
This interface defines entities that create and manage potentially multiple
Appenderator instances.
The AppenderatorsManager should be used by tasks running in a Peon or an CliIndexer process when it needs
an Appenderator.
The AppenderatorsManager also provides methods for creating QueryRunner instances that read the data
held by the Appenderators created through the AppenderatorsManager.
In later updates, this interface will be used to manage memory usage across multiple Appenderators,
useful for the Indexer where all Tasks run in the same process.
The methods on AppenderatorsManager can be called by multiple threads.
This class provides similar functionality to the ServerManager and
SegmentManager on the Historical processes.-
Method Summary
Modifier and TypeMethodDescriptioncreateBatchAppenderatorForTask(String taskId, DataSchema schema, AppenderatorConfig config, TaskDirectory taskDirectory, SegmentGenerationMetrics metrics, DataSegmentPusher dataSegmentPusher, com.fasterxml.jackson.databind.ObjectMapper objectMapper, IndexIO indexIO, IndexMerger indexMerger, RowIngestionMeters rowIngestionMeters, ParseExceptionHandler parseExceptionHandler, CentralizedDatasourceSchemaConfig centralizedDatasourceSchemaConfig) Creates aBatchAppenderatorsuitable for batch ingestion with no ability to process queries against the processed data.createRealtimeAppenderatorForTask(SegmentLoaderConfig segmentLoaderConfig, String taskId, DataSchema schema, AppenderatorConfig config, TaskDirectory taskDirectory, SegmentGenerationMetrics metrics, DataSegmentPusher dataSegmentPusher, com.fasterxml.jackson.databind.ObjectMapper objectMapper, IndexIO indexIO, IndexMerger indexMerger, QueryRunnerFactoryConglomerate conglomerate, DataSegmentAnnouncer segmentAnnouncer, ServiceEmitter emitter, QueryProcessingPool queryProcessingPool, JoinableFactory joinableFactory, Cache cache, CacheConfig cacheConfig, CachePopulatorStats cachePopulatorStats, PolicyEnforcer policyEnforcer, RowIngestionMeters rowIngestionMeters, ParseExceptionHandler parseExceptionHandler, CentralizedDatasourceSchemaConfig centralizedDatasourceSchemaConfig) Creates anStreamAppenderatorsuited for realtime ingestion.<T> QueryRunner<T>getQueryRunnerForIntervals(Query<T> query, Iterable<org.joda.time.Interval> intervals) Returns a query runner for the given intervals over the Appenderators managed by this AppenderatorsManager.<T> QueryRunner<T>getQueryRunnerForSegments(Query<T> query, Iterable<SegmentDescriptor> specs) Returns a query runner for the given segment specs over the Appenderators managed by this AppenderatorsManager.voidremoveAppenderatorsForTask(String taskId, String dataSource) Removes any internal Appenderator-tracking state associated with the provided taskId.booleanAs AppenderatorsManager implementions are service dependent (i.e., Peons and Indexers have different impls), this method allows Tasks to know whether they should announce themselves as nodes and segment servers to the rest of the cluster.voidshutdown()Shut down the AppenderatorsManager.
-
Method Details
-
createRealtimeAppenderatorForTask
Appenderator createRealtimeAppenderatorForTask(SegmentLoaderConfig segmentLoaderConfig, String taskId, DataSchema schema, AppenderatorConfig config, TaskDirectory taskDirectory, SegmentGenerationMetrics metrics, DataSegmentPusher dataSegmentPusher, com.fasterxml.jackson.databind.ObjectMapper objectMapper, IndexIO indexIO, IndexMerger indexMerger, QueryRunnerFactoryConglomerate conglomerate, DataSegmentAnnouncer segmentAnnouncer, ServiceEmitter emitter, QueryProcessingPool queryProcessingPool, JoinableFactory joinableFactory, Cache cache, CacheConfig cacheConfig, CachePopulatorStats cachePopulatorStats, PolicyEnforcer policyEnforcer, RowIngestionMeters rowIngestionMeters, ParseExceptionHandler parseExceptionHandler, CentralizedDatasourceSchemaConfig centralizedDatasourceSchemaConfig) Creates anStreamAppenderatorsuited for realtime ingestion. Note that this method's parameters include objects used for query processing. Intermediary segments are persisted to disk and memory mapped to be available for query processing. -
createBatchAppenderatorForTask
Appenderator createBatchAppenderatorForTask(String taskId, DataSchema schema, AppenderatorConfig config, TaskDirectory taskDirectory, SegmentGenerationMetrics metrics, DataSegmentPusher dataSegmentPusher, com.fasterxml.jackson.databind.ObjectMapper objectMapper, IndexIO indexIO, IndexMerger indexMerger, RowIngestionMeters rowIngestionMeters, ParseExceptionHandler parseExceptionHandler, CentralizedDatasourceSchemaConfig centralizedDatasourceSchemaConfig) Creates aBatchAppenderatorsuitable for batch ingestion with no ability to process queries against the processed data. Intermediary segments are persisted to temporary disk and then merged into the final set of segments at publishing time. -
removeAppenderatorsForTask
Removes any internal Appenderator-tracking state associated with the provided taskId. This method should be called when a task is finished using its Appenderators that were previously created by createRealtimeAppenderatorForTask or createOfflineAppenderatorForTask. The method can be called by the entity managing Tasks when the Tasks finish, such as ThreadingTaskRunner. -
getQueryRunnerForIntervals
<T> QueryRunner<T> getQueryRunnerForIntervals(Query<T> query, Iterable<org.joda.time.Interval> intervals) Returns a query runner for the given intervals over the Appenderators managed by this AppenderatorsManager. -
getQueryRunnerForSegments
Returns a query runner for the given segment specs over the Appenderators managed by this AppenderatorsManager. -
shouldTaskMakeNodeAnnouncements
boolean shouldTaskMakeNodeAnnouncements()As AppenderatorsManager implementions are service dependent (i.e., Peons and Indexers have different impls), this method allows Tasks to know whether they should announce themselves as nodes and segment servers to the rest of the cluster. Only Tasks running in Peons (i.e., as separate processes) should make their own individual node announcements. -
shutdown
void shutdown()Shut down the AppenderatorsManager.
-