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;
}
Aggregations