Examples of OrchestratorStateDuccEvent


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

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

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

   */
 
  public OrchestratorStateDuccEvent getState() {
    String methodName = "getState";
    logger.trace(methodName, null, messages.fetch("enter"));
    OrchestratorStateDuccEvent orchestratorStateDuccEvent = new OrchestratorStateDuccEvent();
    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);
      orchestratorStateDuccEvent.setWorkMap(workMapCopy);
      //stateManager.prune(workMapCopy);
      //healthMonitor.cancelNonViableJobs();
      //mqReaper.removeUnusedJdQueues(workMapCopy);
    }
    catch(Throwable t) {
View Full Code Here

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

    if(exchange != null) {
      if(exchange.getIn() != null) {
        Object body = exchange.getIn().getBody();
        if(body != null) {
          if(body instanceof OrchestratorStateDuccEvent) {
            OrchestratorStateDuccEvent duccEvent = (OrchestratorStateDuccEvent)body;
            int countJ = duccEvent.getWorkMap().getJobCount();
            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
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.