// expensive. If this type of iterator is not available, fall back to
// deserializing/serializing the messages
if (vertexIdMessageBytesIterator != null) {
while (vertexIdMessageBytesIterator.hasNext()) {
vertexIdMessageBytesIterator.next();
DataInputOutput dataInputOutput = getDataInputOutput(partitionMap,
vertexIdMessageBytesIterator.getCurrentVertexId().get());
vertexIdMessageBytesIterator.writeCurrentMessageBytes(
dataInputOutput.getDataOutput());
}
} else {
VertexIdMessageIterator<LongWritable, M>
iterator = messages.getVertexIdMessageIterator();
while (iterator.hasNext()) {
iterator.next();
DataInputOutput dataInputOutput = getDataInputOutput(partitionMap,
iterator.getCurrentVertexId().get());
VerboseByteStructMessageWrite.verboseWriteCurrentMessage(iterator,
dataInputOutput.getDataOutput());
}
}
}
}