/** * Creates a new instance of {@link FileBlockInfo} from a thrift representation. * * @param info the thrift representation of a file block information * @return the instance */ public static FileBlockInfo fromThrift(alluxio.thrift.FileBlockInfo info) { return new FileBlockInfo() .setBlockInfo(BlockInfo.fromThrift(info.getBlockInfo())) .setOffset(info.getOffset()) .setUfsLocations(info.getUfsStringLocationsSize() > 0 ? info.getUfsStringLocations() : map(addr -> HostAndPort.fromParts(addr.getHost(), addr.getDataPort()).toString(), info.getUfsLocations())); }