Search in sources :

Example 1 with VisibleForTesting

use of io.mantisrx.shaded.com.google.common.annotations.VisibleForTesting in project mantis by Netflix.

the class IcebergWriterStage method newTransformer.

@VisibleForTesting
static Transformer newTransformer(WriterConfig writerConfig, WriterMetrics writerMetrics, IcebergWriterPool writerPool, Partitioner partitioner, WorkerInfo workerInfo) {
    int workerIdx = workerInfo.getWorkerIndex();
    String nameFormat = "IcebergWriter (" + (workerIdx + 1) + ")-%d";
    Scheduler executingService = new MantisRxSingleThreadScheduler(new ThreadFactoryBuilder().setNameFormat(nameFormat).build());
    return new Transformer(writerConfig, writerMetrics, writerPool, partitioner, Schedulers.computation(), executingService);
}
Also used : MantisRxSingleThreadScheduler(io.mantisrx.runtime.scheduler.MantisRxSingleThreadScheduler) Scheduler(rx.Scheduler) ThreadFactoryBuilder(com.google.common.util.concurrent.ThreadFactoryBuilder) MantisRxSingleThreadScheduler(io.mantisrx.runtime.scheduler.MantisRxSingleThreadScheduler) VisibleForTesting(io.mantisrx.shaded.com.google.common.annotations.VisibleForTesting)

Aggregations

ThreadFactoryBuilder (com.google.common.util.concurrent.ThreadFactoryBuilder)1 MantisRxSingleThreadScheduler (io.mantisrx.runtime.scheduler.MantisRxSingleThreadScheduler)1 VisibleForTesting (io.mantisrx.shaded.com.google.common.annotations.VisibleForTesting)1 Scheduler (rx.Scheduler)1