use of org.apache.druid.java.util.emitter.core.NoopEmitter in project druid by druid-io.
the class MySQLMetadataStorageModuleTest method createInjector.
private Injector createInjector() {
MySQLMetadataStorageModule module = new MySQLMetadataStorageModule();
Injector injector = GuiceInjectors.makeStartupInjectorWithModules(ImmutableList.of(new MetadataConfigModule(), new LifecycleModule(), module, new Module() {
@Override
public void configure(Binder binder) {
module.createBindingChoices(binder, "mysql");
}
@Provides
public ServiceEmitter getEmitter() {
return new ServiceEmitter("test", "localhost", new NoopEmitter());
}
}));
ObjectMapper mapper = injector.getInstance(Key.get(ObjectMapper.class, Json.class));
mapper.registerModules(module.getJacksonModules());
return injector;
}
use of org.apache.druid.java.util.emitter.core.NoopEmitter in project druid by druid-io.
the class NoopEmitterFactory method makeEmitter.
public Emitter makeEmitter(Lifecycle lifecycle) {
Emitter retVal = new NoopEmitter();
lifecycle.addManagedInstance(retVal);
return retVal;
}
use of org.apache.druid.java.util.emitter.core.NoopEmitter in project druid by druid-io.
the class KinesisIndexTaskTest method setupClass.
@BeforeClass
public static void setupClass() {
emitter = new ServiceEmitter("service", "host", new NoopEmitter());
emitter.start();
EmittingLogger.registerEmitter(emitter);
taskExec = MoreExecutors.listeningDecorator(Executors.newCachedThreadPool(Execs.makeThreadFactory("kinesis-task-test-%d")));
}
use of org.apache.druid.java.util.emitter.core.NoopEmitter in project druid by druid-io.
the class KafkaIndexTaskTest method setupClass.
@BeforeClass
public static void setupClass() throws Exception {
emitter = new ServiceEmitter("service", "host", new NoopEmitter());
emitter.start();
EmittingLogger.registerEmitter(emitter);
zkServer = new TestingCluster(1);
zkServer.start();
kafkaServer = new TestBroker(zkServer.getConnectString(), null, 1, ImmutableMap.of("num.partitions", "2"));
kafkaServer.start();
taskExec = MoreExecutors.listeningDecorator(Executors.newCachedThreadPool(Execs.makeThreadFactory("kafka-task-test-%d")));
}
Aggregations