Class DummyForInjectionAppenderatorsManager
java.lang.Object
org.apache.druid.segment.realtime.appenderator.DummyForInjectionAppenderatorsManager
- All Implemented Interfaces:
AppenderatorsManager
This implementation is needed because Overlords and MiddleManagers operate on Task objects which
can require an AppenderatorsManager to be injected.
The methods of this implementation throw exceptions because the Overlord/MM should never be calling
the AppenderatorsManager.
-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
DummyForInjectionAppenderatorsManager
public DummyForInjectionAppenderatorsManager()
-
-
Method Details
-
createRealtimeAppenderatorForTask
public 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) Description copied from interface:AppenderatorsManagerCreates 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.- Specified by:
createRealtimeAppenderatorForTaskin interfaceAppenderatorsManager
-
createBatchAppenderatorForTask
public 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) Description copied from interface:AppenderatorsManagerCreates 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.- Specified by:
createBatchAppenderatorForTaskin interfaceAppenderatorsManager
-
removeAppenderatorsForTask
Description copied from interface:AppenderatorsManagerRemoves 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.- Specified by:
removeAppenderatorsForTaskin interfaceAppenderatorsManager
-
getQueryRunnerForIntervals
public <T> QueryRunner<T> getQueryRunnerForIntervals(Query<T> query, Iterable<org.joda.time.Interval> intervals) Description copied from interface:AppenderatorsManagerReturns a query runner for the given intervals over the Appenderators managed by this AppenderatorsManager.- Specified by:
getQueryRunnerForIntervalsin interfaceAppenderatorsManager
-
getQueryRunnerForSegments
public <T> QueryRunner<T> getQueryRunnerForSegments(Query<T> query, Iterable<SegmentDescriptor> specs) Description copied from interface:AppenderatorsManagerReturns a query runner for the given segment specs over the Appenderators managed by this AppenderatorsManager.- Specified by:
getQueryRunnerForSegmentsin interfaceAppenderatorsManager
-
shouldTaskMakeNodeAnnouncements
public boolean shouldTaskMakeNodeAnnouncements()Description copied from interface:AppenderatorsManagerAs 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.- Specified by:
shouldTaskMakeNodeAnnouncementsin interfaceAppenderatorsManager
-
shutdown
public void shutdown()Description copied from interface:AppenderatorsManagerShut down the AppenderatorsManager.- Specified by:
shutdownin interfaceAppenderatorsManager
-