Package org.apache.uima.ducc.transport.event

Examples of org.apache.uima.ducc.transport.event.OrchestratorAbbreviatedStateDuccEvent


    private OrchestratorAbbreviatedStateProcessor(Orchestrator orchestrator) {
      this.orchestrator = orchestrator;
    }
    public void process(Exchange exchange) throws Exception {
      // Fetch new state from Orchestrator
      OrchestratorAbbreviatedStateDuccEvent jse = orchestrator.getAbbreviatedState();
      //  Add the state object to the Message
      exchange.getIn().setBody(jse);
    }
View Full Code Here


   */
 
  public OrchestratorAbbreviatedStateDuccEvent getAbbreviatedState() {
    String methodName = "getAbbreviatedState";
    logger.trace(methodName, null, messages.fetch("enter"));
    OrchestratorAbbreviatedStateDuccEvent orchestratorAbbreviatedStateDuccEvent = new OrchestratorAbbreviatedStateDuccEvent();
    try {
      long t0 = System.currentTimeMillis();
      DuccWorkMap workMapCopy = workMap.deepCopy();
      long t1 = System.currentTimeMillis();
      long elapsed = t1 - t0;
      if(elapsed > Constants.SYNC_LIMIT) {
        logger.debug(methodName, null, "elapsed msecs: "+elapsed);
      }
      int activeJobs = workMapCopy.getJobCount();
      int activeReservations = workMapCopy.getReservationCount();
      int activeServices = workMapCopy.getServiceCount();
      logger.debug(methodName, null, messages.fetch("publishing state")+" "+
                      messages.fetchLabel("active job count")+activeJobs
                      +" "+
                      messages.fetchLabel("active reservation count")+activeReservations
                      +" "+
                      messages.fetchLabel("active service count")+activeServices
                      );
      int jobDriverNodeCount = hostManager.nodes();
      workMapCopy.setJobDriverNodeCount(jobDriverNodeCount);
      long t2 = System.currentTimeMillis();
      orchestratorAbbreviatedStateDuccEvent.setWorkMap(workMapCopy);
      long t3 = System.currentTimeMillis();
      long elapsed2 = t3 - t2;
      if(elapsed > Constants.SYNC_LIMIT) {
        logger.debug(methodName, null, "elapsed msecs: "+elapsed2);
      }
View Full Code Here

            int countR = duccEvent.getWorkMap().getReservationCount();
            int countS = duccEvent.getWorkMap().getServiceCount();
            details = "jobs:"+countJ+" "+"reservations:"+countR+" "+"services:"+countS;
          }
          if(body instanceof OrchestratorAbbreviatedStateDuccEvent) {
            OrchestratorAbbreviatedStateDuccEvent duccEvent = (OrchestratorAbbreviatedStateDuccEvent)body;
            int countJ = duccEvent.getWorkMap().getJobCount();
            int countR = duccEvent.getWorkMap().getReservationCount();
            int countS = duccEvent.getWorkMap().getServiceCount();
            details = "jobs:"+countJ+" "+"reservations:"+countR+" "+"services:"+countS;
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.transport.event.OrchestratorAbbreviatedStateDuccEvent

Copyright © 2018 www.massapicom. 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.