code: public long getAvailableBytes(BlockStoreLocation location) {
      long spaceAvailable = 0;
  
      if (location.equals(BlockStoreLocation.anyTier())) {
        for (StorageTier tier : mTiers) {
          spaceAvailable += tier.getAvailableBytes();
        }
        return spaceAvailable;
      }
  
      String tierAlias = location.tierAlias();
      StorageTier tier = getTier(tierAlias);
      // TODO(calvin): This should probably be max of the capacity bytes in the dirs?
      if (location.equals(BlockStoreLocation.anyDirInTier(tierAlias))) {
        return tier.getAvailableBytes();
      }
  
      int dirIndex = location.dir();
      StorageDir dir = tier.getDir(dirIndex);
      return dir.getAvailableBytes();
    }
docs: Gets the amount of available space of given location in bytes. Master queries the total number
  of bytes available on each tier of the worker, and Evictor/Allocator often cares about the
  bytes at a {@link StorageDir}. Throws an {@link IllegalArgumentException} when the location
  does not belong to the tiered storage.
  
  @param location location the check available bytes
  @return available bytes