/** * Check if the list is empty. * * @return True iff there are no pairs in the list */ public boolean isEmpty() { return getSize() == 0; }
@Override public void writeRequest(DataOutput output) throws IOException { output.writeInt(partitionVertexData.getSize()); PairList<Integer, B>.Iterator iterator = partitionVertexData.getIterator(); while (iterator.hasNext()) { iterator.next(); output.writeInt(iterator.getCurrentFirst()); iterator.getCurrentSecond().write(output); } }
@Override public void writeRequest(DataOutput output) throws IOException { output.writeInt(workerPartitions.getSize()); PairList<Integer, ExtendedDataOutput>.Iterator iterator = workerPartitions.getIterator(); while (iterator.hasNext()) { iterator.next(); output.writeInt(iterator.getCurrentFirst()); WritableUtils.writeExtendedDataOutput( iterator.getCurrentSecond(), output); } }