if (workerBlockCounts.containsKey(blockLocation.getWorkerId())) { workerBlockCounts.put(blockLocation.getWorkerId(), workerBlockCounts.get(blockLocation.getWorkerId()) + 1); } else { workerBlockCounts.put(blockLocation.getWorkerId(), 1); if (workerBlockCounts.get(blockLocation.getWorkerId()) == blockInfoList.size()) { return blockLocation.getWorkerId();
/** * Converts wire type to proto type. * * @param blockLocation the wire type to convert * @return the converted proto type */ public static alluxio.grpc.BlockLocation toProto(BlockLocation blockLocation) { return alluxio.grpc.BlockLocation.newBuilder().setWorkerId(blockLocation.getWorkerId()) .setWorkerAddress(toProto(blockLocation.getWorkerAddress())) .setTierAlias(blockLocation.getTierAlias()).build(); }
public void checkEquality(BlockLocation a, BlockLocation b) { Assert.assertEquals(a.getWorkerId(), b.getWorkerId()); Assert.assertEquals(a.getWorkerAddress(), b.getWorkerAddress()); Assert.assertEquals(a.getTierAlias(), b.getTierAlias()); Assert.assertEquals(a, b); }
if (workerBlockCounts.containsKey(blockLocation.getWorkerId())) { workerBlockCounts.put(blockLocation.getWorkerId(), workerBlockCounts.get(blockLocation.getWorkerId()) + 1); } else { workerBlockCounts.put(blockLocation.getWorkerId(), 1); if (workerBlockCounts.get(blockLocation.getWorkerId()) == blockInfoList.size()) { return blockLocation.getWorkerId();