Search in sources :

Example 16 with TaskActionClientFactory

use of org.apache.druid.indexing.common.actions.TaskActionClientFactory in project druid by druid-io.

the class WorkerTaskManagerTest method createWorkerTaskManager.

private WorkerTaskManager createWorkerTaskManager() {
    TaskConfig taskConfig = new TaskConfig(FileUtils.createTempDir().toString(), null, null, 0, null, false, null, null, null, false, false, TaskConfig.BATCH_PROCESSING_MODE_DEFAULT.name());
    TaskActionClientFactory taskActionClientFactory = EasyMock.createNiceMock(TaskActionClientFactory.class);
    TaskActionClient taskActionClient = EasyMock.createNiceMock(TaskActionClient.class);
    EasyMock.expect(taskActionClientFactory.create(EasyMock.anyObject())).andReturn(taskActionClient).anyTimes();
    SegmentHandoffNotifierFactory notifierFactory = EasyMock.createNiceMock(SegmentHandoffNotifierFactory.class);
    EasyMock.replay(taskActionClientFactory, taskActionClient, notifierFactory);
    return new WorkerTaskManager(jsonMapper, new TestTaskRunner(new TaskToolboxFactory(taskConfig, null, taskActionClientFactory, null, null, null, null, null, null, null, notifierFactory, null, null, NoopJoinableFactory.INSTANCE, null, new SegmentCacheManagerFactory(jsonMapper), jsonMapper, indexIO, null, null, null, indexMergerV9, null, null, null, null, new NoopTestTaskReportFileWriter(), null, AuthTestUtils.TEST_AUTHORIZER_MAPPER, new NoopChatHandlerProvider(), testUtils.getRowIngestionMetersFactory(), new TestAppenderatorsManager(), new NoopIndexingServiceClient(), null, null, null), taskConfig, location), taskConfig, EasyMock.createNiceMock(DruidLeaderClient.class)) {

        @Override
        protected void taskStarted(String taskId) {
        }

        @Override
        protected void taskAnnouncementChanged(TaskAnnouncement announcement) {
        }
    };
}
Also used : NoopChatHandlerProvider(org.apache.druid.segment.realtime.firehose.NoopChatHandlerProvider) TestTaskRunner(org.apache.druid.indexing.overlord.TestTaskRunner) SegmentCacheManagerFactory(org.apache.druid.indexing.common.SegmentCacheManagerFactory) TaskActionClientFactory(org.apache.druid.indexing.common.actions.TaskActionClientFactory) TaskConfig(org.apache.druid.indexing.common.config.TaskConfig) DruidLeaderClient(org.apache.druid.discovery.DruidLeaderClient) SegmentHandoffNotifierFactory(org.apache.druid.segment.handoff.SegmentHandoffNotifierFactory) TaskActionClient(org.apache.druid.indexing.common.actions.TaskActionClient) NoopIndexingServiceClient(org.apache.druid.client.indexing.NoopIndexingServiceClient) TaskToolboxFactory(org.apache.druid.indexing.common.TaskToolboxFactory) NoopTestTaskReportFileWriter(org.apache.druid.indexing.common.task.NoopTestTaskReportFileWriter) TestAppenderatorsManager(org.apache.druid.indexing.common.task.TestAppenderatorsManager)

Aggregations

TaskActionClientFactory (org.apache.druid.indexing.common.actions.TaskActionClientFactory)16 NoopServiceEmitter (org.apache.druid.server.metrics.NoopServiceEmitter)11 Test (org.junit.Test)11 DefaultTaskConfig (org.apache.druid.indexing.overlord.config.DefaultTaskConfig)10 TaskLockConfig (org.apache.druid.indexing.overlord.config.TaskLockConfig)10 TaskQueueConfig (org.apache.druid.indexing.overlord.config.TaskQueueConfig)10 Task (org.apache.druid.indexing.common.task.Task)8 NoopIndexingServiceClient (org.apache.druid.client.indexing.NoopIndexingServiceClient)6 SegmentCacheManagerFactory (org.apache.druid.indexing.common.SegmentCacheManagerFactory)6 TaskToolboxFactory (org.apache.druid.indexing.common.TaskToolboxFactory)6 TaskConfig (org.apache.druid.indexing.common.config.TaskConfig)6 AbstractBatchIndexTask (org.apache.druid.indexing.common.task.AbstractBatchIndexTask)6 SegmentHandoffNotifierFactory (org.apache.druid.segment.handoff.SegmentHandoffNotifierFactory)6 NoopChatHandlerProvider (org.apache.druid.segment.realtime.firehose.NoopChatHandlerProvider)6 ImmutableMap (com.google.common.collect.ImmutableMap)5 Map (java.util.Map)5 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)4 Executor (java.util.concurrent.Executor)4 CacheConfig (org.apache.druid.client.cache.CacheConfig)4 CachePopulatorStats (org.apache.druid.client.cache.CachePopulatorStats)4