Search in sources :

Example 1 with Worker

use of alluxio.worker.Worker in project alluxio by Alluxio.

the class KeyValueWorkerFactory method create.

@Override
public KeyValueWorker create(List<? extends Worker> workers) {
    if (!Configuration.getBoolean(PropertyKey.KEY_VALUE_ENABLED)) {
        return null;
    }
    LOG.info("Creating {} ", KeyValueWorker.class.getName());
    for (Worker worker : workers) {
        if (worker instanceof BlockWorker) {
            LOG.info("{} is created", KeyValueWorker.class.getName());
            return new KeyValueWorker(((BlockWorker) worker));
        }
    }
    LOG.error("Fail to create {} due to missing {}", KeyValueWorker.class.getName(), BlockWorker.class.getName());
    return null;
}
Also used : BlockWorker(alluxio.worker.block.BlockWorker) Worker(alluxio.worker.Worker) BlockWorker(alluxio.worker.block.BlockWorker)

Aggregations

Worker (alluxio.worker.Worker)1 BlockWorker (alluxio.worker.block.BlockWorker)1