Search in sources :

Example 1 with TestBroker

use of org.apache.druid.indexing.kafka.test.TestBroker in project druid by druid-io.

the class KafkaRecordSupplierTest method setupClass.

@BeforeClass
public static void setupClass() throws Exception {
    zkServer = new TestingCluster(1);
    zkServer.start();
    kafkaServer = new TestBroker(zkServer.getConnectString(), null, 1, ImmutableMap.of("num.partitions", "2"));
    kafkaServer.start();
}
Also used : TestingCluster(org.apache.curator.test.TestingCluster) TestBroker(org.apache.druid.indexing.kafka.test.TestBroker) BeforeClass(org.junit.BeforeClass)

Example 2 with TestBroker

use of org.apache.druid.indexing.kafka.test.TestBroker in project druid by druid-io.

the class KafkaSupervisorTest method setupClass.

@BeforeClass
public static void setupClass() throws Exception {
    zkServer = new TestingCluster(1);
    zkServer.start();
    kafkaServer = new TestBroker(zkServer.getConnectString(), null, 1, ImmutableMap.of("num.partitions", String.valueOf(NUM_PARTITIONS), "auto.create.topics.enable", String.valueOf(false)));
    kafkaServer.start();
    kafkaHost = StringUtils.format("localhost:%d", kafkaServer.getPort());
    dataSchema = getDataSchema(DATASOURCE);
}
Also used : TestingCluster(org.apache.curator.test.TestingCluster) TestBroker(org.apache.druid.indexing.kafka.test.TestBroker) BeforeClass(org.junit.BeforeClass)

Example 3 with TestBroker

use of org.apache.druid.indexing.kafka.test.TestBroker in project druid by druid-io.

the class KafkaSamplerSpecTest method setupClass.

@BeforeClass
public static void setupClass() throws Exception {
    zkServer = new TestingCluster(1);
    zkServer.start();
    kafkaServer = new TestBroker(zkServer.getConnectString(), null, 1, ImmutableMap.of("num.partitions", "2"));
    kafkaServer.start();
}
Also used : TestingCluster(org.apache.curator.test.TestingCluster) TestBroker(org.apache.druid.indexing.kafka.test.TestBroker) BeforeClass(org.junit.BeforeClass)

Example 4 with TestBroker

use of org.apache.druid.indexing.kafka.test.TestBroker 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")));
}
Also used : ServiceEmitter(org.apache.druid.java.util.emitter.service.ServiceEmitter) TestingCluster(org.apache.curator.test.TestingCluster) TestBroker(org.apache.druid.indexing.kafka.test.TestBroker) NoopEmitter(org.apache.druid.java.util.emitter.core.NoopEmitter) BeforeClass(org.junit.BeforeClass)

Aggregations

TestingCluster (org.apache.curator.test.TestingCluster)4 TestBroker (org.apache.druid.indexing.kafka.test.TestBroker)4 BeforeClass (org.junit.BeforeClass)4 NoopEmitter (org.apache.druid.java.util.emitter.core.NoopEmitter)1 ServiceEmitter (org.apache.druid.java.util.emitter.service.ServiceEmitter)1