use of alluxio.MasterStorageTierAssoc in project alluxio by Alluxio.
the class AlluxioMasterRestServiceHandler method getTierAliasComparator.
private Comparator<String> getTierAliasComparator() {
return new Comparator<String>() {
private MasterStorageTierAssoc mTierAssoc = new MasterStorageTierAssoc();
@Override
public int compare(String tier1, String tier2) {
int ordinal1 = mTierAssoc.getOrdinal(tier1);
int ordinal2 = mTierAssoc.getOrdinal(tier2);
if (ordinal1 < ordinal2) {
return -1;
}
if (ordinal1 == ordinal2) {
return 0;
}
return 1;
}
};
}
use of alluxio.MasterStorageTierAssoc in project alluxio by Alluxio.
the class BlockMaster method start.
@Override
public void start(boolean isLeader) throws IOException {
super.start(isLeader);
mGlobalStorageTierAssoc = new MasterStorageTierAssoc();
if (isLeader) {
mLostWorkerDetectionService = getExecutorService().submit(new HeartbeatThread(HeartbeatContext.MASTER_LOST_WORKER_DETECTION, new LostWorkerDetectionHeartbeatExecutor(), Configuration.getInt(PropertyKey.MASTER_HEARTBEAT_INTERVAL_MS)));
}
}
Aggregations