/** * Returns the net address of all the location hosts * * @return the list of those net address, in String * @throws IOException if the underlying file does not exist or its metadata is corrupted */ public List<String> getLocationHosts() throws IOException { List<String> ret = Lists.newArrayList(); if (getNumberOfBlocks() > 0) { // add tachyon locations first List<BlockLocation> blockLocations = getClientBlockInfo(0).getBlockInfo().getLocations(); if (blockLocations != null) { for (BlockLocation location : blockLocations) { ret.add(location.workerAddress.host); } } // under FS locations List<NetAddress> underFsLocations = getClientBlockInfo(0).getUfsLocations(); if (underFsLocations != null) { for (NetAddress location : underFsLocations) { ret.add(location.host); } } } return ret; }