}
if (readerVertex.getVertexValue() == null) {
readerVertex.setVertexValue(
BspUtils.<V>createVertexValue(getConfiguration()));
}
PartitionOwner partitionOwner =
workerGraphPartitioner.getPartitionOwner(
readerVertex.getVertexId());
Partition<I, V, E, M> partition =
inputSplitCache.get(partitionOwner);
if (partition == null) {
partition = new Partition<I, V, E, M>(
getConfiguration(),
partitionOwner.getPartitionId());
inputSplitCache.put(partitionOwner, partition);
}
BasicVertex<I, V, E, M> oldVertex =
partition.putVertex(readerVertex);
if (oldVertex != null) {
LOG.warn("readVertices: Replacing vertex " + oldVertex +
" with " + readerVertex);
}
if (partition.getVertices().size() >= maxVerticesPerPartition) {
commService.sendPartitionReq(partitionOwner.getWorkerInfo(),
partition);
partition.getVertices().clear();
}
++vertexCount;
edgeCount += readerVertex.getNumOutEdges();