Examples of OutboundVertexQueue


Examples of org.goldenorb.queue.OutboundVertexQueue

*/
    @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();
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.