Search in sources :

Example 1 with OffsetBackingStore

use of org.apache.kafka.connect.storage.OffsetBackingStore in project ignite by apache.

the class IgniteSinkConnectorTest method beforeTest.

/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override
protected void beforeTest() throws Exception {
    kafkaBroker = new TestKafkaBroker();
    for (String topic : TOPICS) kafkaBroker.createTopic(topic, PARTITIONS, REPLICATION_FACTOR);
    WorkerConfig workerCfg = new StandaloneConfig(makeWorkerProps());
    OffsetBackingStore offBackingStore = mock(OffsetBackingStore.class);
    offBackingStore.configure(workerCfg);
    worker = new Worker(WORKER_ID, new SystemTime(), workerCfg, offBackingStore);
    worker.start();
    herder = new StandaloneHerder(worker);
    herder.start();
}
Also used : OffsetBackingStore(org.apache.kafka.connect.storage.OffsetBackingStore) StandaloneHerder(org.apache.kafka.connect.runtime.standalone.StandaloneHerder) WorkerConfig(org.apache.kafka.connect.runtime.WorkerConfig) Worker(org.apache.kafka.connect.runtime.Worker) TestKafkaBroker(org.apache.ignite.stream.kafka.TestKafkaBroker) StandaloneConfig(org.apache.kafka.connect.runtime.standalone.StandaloneConfig) SystemTime(org.apache.kafka.common.utils.SystemTime)

Aggregations

TestKafkaBroker (org.apache.ignite.stream.kafka.TestKafkaBroker)1 SystemTime (org.apache.kafka.common.utils.SystemTime)1 Worker (org.apache.kafka.connect.runtime.Worker)1 WorkerConfig (org.apache.kafka.connect.runtime.WorkerConfig)1 StandaloneConfig (org.apache.kafka.connect.runtime.standalone.StandaloneConfig)1 StandaloneHerder (org.apache.kafka.connect.runtime.standalone.StandaloneHerder)1 OffsetBackingStore (org.apache.kafka.connect.storage.OffsetBackingStore)1