use of alluxio.master.Master in project alluxio by Alluxio.
the class KeyValueMasterFactory method create.
@Override
public KeyValueMaster create(List<? extends Master> masters, JournalFactory journalFactory) {
if (!isEnabled()) {
return null;
}
Preconditions.checkArgument(journalFactory != null, "journal factory may not be null");
LOG.info("Creating {} ", KeyValueMaster.class.getName());
Journal journal = journalFactory.get(getName());
for (Master master : masters) {
if (master instanceof FileSystemMaster) {
LOG.info("{} is created", KeyValueMaster.class.getName());
return new KeyValueMaster((FileSystemMaster) master, journal);
}
}
LOG.error("Fail to create {} due to missing {}", KeyValueMaster.class.getName(), FileSystemMaster.class.getName());
return null;
}
Aggregations