Set<String> allTiers = Sets.newHashSet(Configuration.getList(PropertyKey.LOCALITY_ORDER, ",")); Map<String, String> tiers = new HashMap<>(); for (String tier : identityString.split(",")) { for (String localityTier : Configuration.getList(PropertyKey.LOCALITY_ORDER, ",")) { String value = tiers.containsKey(localityTier) ? tiers.get(localityTier) : null; tieredIdentity.add(new LocalityTier(localityTier, value));
List<String> orderedTierNames = Configuration.getList(PropertyKey.LOCALITY_ORDER, ","); for (int i = 0; i < orderedTierNames.size(); i++) { String tierName = orderedTierNames.get(i);
/** * Creates a new instance of {@link DefaultFileSystemMaster}. * * @param blockMaster a block master handle * @param masterContext the context for Alluxio master * @param executorServiceFactory a factory for creating the executor service to use for running * maintenance threads */ DefaultFileSystemMaster(BlockMaster blockMaster, MasterContext masterContext, ExecutorServiceFactory executorServiceFactory) { super(masterContext, new SystemClock(), executorServiceFactory); mBlockMaster = blockMaster; mDirectoryIdGenerator = new InodeDirectoryIdGenerator(mBlockMaster); mUfsManager = new MasterUfsManager(); mMountTable = new MountTable(mUfsManager); mInodeTree = new InodeTree(mBlockMaster, mDirectoryIdGenerator, mMountTable); // TODO(gene): Handle default config value for whitelist. mWhitelist = new PrefixList(Configuration.getList(PropertyKey.MASTER_WHITELIST, ",")); mAsyncPersistHandler = AsyncPersistHandler.Factory.create(new FileSystemMasterView(this)); mPermissionChecker = new DefaultPermissionChecker(mInodeTree); mUfsAbsentPathCache = UfsAbsentPathCache.Factory.create(mMountTable); mUfsBlockLocationCache = UfsBlockLocationCache.Factory.create(mMountTable); mUfsSyncPathCache = new UfsSyncPathCache(); resetState(); Metrics.registerGauges(this, mUfsManager); }