*/
@SuppressWarnings("unchecked")
@Override
public void run() {
OutboundVertexQueue outboundVertexQueue;
outboundVertexQueue = new OutboundVertexQueue(getOrbConf().getOrbRequestedPartitions(), getOrbConf()
.getVerticesPerBlock(), orbClients, (Class<? extends Vertex<?,?,?>>) getOrbConf().getVertexClass(),
getPartitionID());
LOG.info("Loading on machine " + getHostname() + ":" + interpartitionCommunicationPort);
VertexBuilder<?,?,?> vertexBuilder = ReflectionUtils.newInstance(getOrbConf()
.getVertexInputFormatClass(), getOrbConf());
vertexBuilder.setOrbConf(getOrbConf());
vertexBuilder.setPartitionID(getPartitionID());
vertexBuilder.setRawSplit(rawsplit.getBytes());
vertexBuilder.setSplitClass(rawsplit.getClassName());
vertexBuilder.initialize();
try {
while (vertexBuilder.nextVertex()) {
outboundVertexQueue.sendVertex(vertexBuilder.getCurrentVertex());
}
} catch (IOException e) {
// TODO Data loading failed --- needs to fire a death event.
e.printStackTrace();
} catch (InterruptedException e) {
// TODO Data loading failed --- needs to fire a death event.
e.printStackTrace();
}
outboundVertexQueue.sendRemainingVertices();
inputSplitLoaderHandlers.remove(this);
synchronized (OrbPartition.this) {
OrbPartition.this.notify();
}
}