Search in sources :

Example 1 with TestTaskRunner

use of org.apache.druid.indexing.overlord.TestTaskRunner 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

NoopIndexingServiceClient (org.apache.druid.client.indexing.NoopIndexingServiceClient)1 DruidLeaderClient (org.apache.druid.discovery.DruidLeaderClient)1 SegmentCacheManagerFactory (org.apache.druid.indexing.common.SegmentCacheManagerFactory)1 TaskToolboxFactory (org.apache.druid.indexing.common.TaskToolboxFactory)1 TaskActionClient (org.apache.druid.indexing.common.actions.TaskActionClient)1 TaskActionClientFactory (org.apache.druid.indexing.common.actions.TaskActionClientFactory)1 TaskConfig (org.apache.druid.indexing.common.config.TaskConfig)1 NoopTestTaskReportFileWriter (org.apache.druid.indexing.common.task.NoopTestTaskReportFileWriter)1 TestAppenderatorsManager (org.apache.druid.indexing.common.task.TestAppenderatorsManager)1 TestTaskRunner (org.apache.druid.indexing.overlord.TestTaskRunner)1 SegmentHandoffNotifierFactory (org.apache.druid.segment.handoff.SegmentHandoffNotifierFactory)1 NoopChatHandlerProvider (org.apache.druid.segment.realtime.firehose.NoopChatHandlerProvider)1