use of org.apache.druid.indexing.test.TestIndexerMetadataStorageCoordinator in project druid by druid-io.
the class TaskLockConfigTest method createTaskQueue.
private TaskQueue createTaskQueue(@Nullable Boolean forceTimeChunkLock) {
final TaskLockConfig lockConfig;
if (forceTimeChunkLock != null) {
lockConfig = new TaskLockConfig() {
@Override
public boolean isForceTimeChunkLock() {
return forceTimeChunkLock;
}
};
} else {
lockConfig = new TaskLockConfig();
}
final TaskQueueConfig queueConfig = new TaskQueueConfig(null, null, null, null);
final TaskRunner taskRunner = EasyMock.createNiceMock(RemoteTaskRunner.class);
final TaskActionClientFactory actionClientFactory = EasyMock.createNiceMock(LocalTaskActionClientFactory.class);
final TaskLockbox lockbox = new TaskLockbox(taskStorage, new TestIndexerMetadataStorageCoordinator());
final ServiceEmitter emitter = new NoopServiceEmitter();
return new TaskQueue(lockConfig, queueConfig, new DefaultTaskConfig(), taskStorage, taskRunner, actionClientFactory, lockbox, emitter);
}
Aggregations