Search in sources :

Example 1 with ThreadPoolTaskRunner

use of io.druid.indexing.overlord.ThreadPoolTaskRunner in project druid by druid-io.

the class WorkerTaskMonitorTest method createTaskMonitor.

private WorkerTaskMonitor createTaskMonitor() {
    final TaskConfig taskConfig = new TaskConfig(Files.createTempDir().toString(), null, null, 0, null, false, null, null);
    TaskActionClientFactory taskActionClientFactory = EasyMock.createNiceMock(TaskActionClientFactory.class);
    TaskActionClient taskActionClient = EasyMock.createNiceMock(TaskActionClient.class);
    EasyMock.expect(taskActionClientFactory.create(EasyMock.<Task>anyObject())).andReturn(taskActionClient).anyTimes();
    SegmentHandoffNotifierFactory notifierFactory = EasyMock.createNiceMock(SegmentHandoffNotifierFactory.class);
    EasyMock.replay(taskActionClientFactory, taskActionClient, notifierFactory);
    return new WorkerTaskMonitor(jsonMapper, cf, workerCuratorCoordinator, new ThreadPoolTaskRunner(new TaskToolboxFactory(taskConfig, taskActionClientFactory, null, null, null, null, null, null, notifierFactory, null, null, null, new SegmentLoaderFactory(new SegmentLoaderLocalCacheManager(null, new SegmentLoaderConfig() {

        @Override
        public List<StorageLocationConfig> getLocations() {
            return Lists.newArrayList();
        }
    }, jsonMapper)), jsonMapper, indexMerger, indexIO, null, null, indexMergerV9), taskConfig, new NoopServiceEmitter(), DUMMY_NODE));
}
Also used : Task(io.druid.indexing.common.task.Task) TestRealtimeTask(io.druid.indexing.common.TestRealtimeTask) TaskActionClientFactory(io.druid.indexing.common.actions.TaskActionClientFactory) TaskConfig(io.druid.indexing.common.config.TaskConfig) NoopServiceEmitter(io.druid.server.metrics.NoopServiceEmitter) SegmentHandoffNotifierFactory(io.druid.segment.realtime.plumber.SegmentHandoffNotifierFactory) TaskActionClient(io.druid.indexing.common.actions.TaskActionClient) TaskToolboxFactory(io.druid.indexing.common.TaskToolboxFactory) ThreadPoolTaskRunner(io.druid.indexing.overlord.ThreadPoolTaskRunner) List(java.util.List) SegmentLoaderConfig(io.druid.segment.loading.SegmentLoaderConfig) SegmentLoaderFactory(io.druid.indexing.common.SegmentLoaderFactory) SegmentLoaderLocalCacheManager(io.druid.segment.loading.SegmentLoaderLocalCacheManager)

Aggregations

SegmentLoaderFactory (io.druid.indexing.common.SegmentLoaderFactory)1 TaskToolboxFactory (io.druid.indexing.common.TaskToolboxFactory)1 TestRealtimeTask (io.druid.indexing.common.TestRealtimeTask)1 TaskActionClient (io.druid.indexing.common.actions.TaskActionClient)1 TaskActionClientFactory (io.druid.indexing.common.actions.TaskActionClientFactory)1 TaskConfig (io.druid.indexing.common.config.TaskConfig)1 Task (io.druid.indexing.common.task.Task)1 ThreadPoolTaskRunner (io.druid.indexing.overlord.ThreadPoolTaskRunner)1 SegmentLoaderConfig (io.druid.segment.loading.SegmentLoaderConfig)1 SegmentLoaderLocalCacheManager (io.druid.segment.loading.SegmentLoaderLocalCacheManager)1 SegmentHandoffNotifierFactory (io.druid.segment.realtime.plumber.SegmentHandoffNotifierFactory)1 NoopServiceEmitter (io.druid.server.metrics.NoopServiceEmitter)1 List (java.util.List)1