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

Examples of org.apache.uima.ducc.transport.event.common.DuccProcess


    driver.setCommandLine(driverCommandLine);
    //
    NodeIdentity nodeIdentity = hostManager.getNode();
    DuccId duccId = jdIdFactory.next();
    duccId.setFriendly(0);
    DuccProcess driverProcess = new DuccProcess(duccId,nodeIdentity,ProcessType.Pop);
    CGroupManager.assign(job.getDuccId(), driverProcess, driver_max_size_in_bytes);
    driverProcess.setResourceState(ResourceState.Allocated);
    driverProcess.setNodeIdentity(nodeIdentity);
    driver.getProcessMap().put(driverProcess.getDuccId(), driverProcess);
    //
    orchestratorCommonArea.getProcessAccounting().addProcess(duccId, job.getDuccId());
    //
    job.setDriver(driver);
  }
View Full Code Here


     * physical machine simulating a cluster of nodes.
     *
     */
    public void launchProcess(String host, String ip, ICommandLine cmdLine) throws Exception {
        IDuccProcess process =
            new DuccProcess(duccIdFactory.next(), new NodeIdentity(ip, host));
        process.setProcessType(ProcessType.Pop);
        ManagedProcess managedProcess = new ManagedProcess(process, cmdLine, true);
        DuccCommandExecutor executor =
            new DuccCommandExecutor(cmdLine, host, ip, managedProcess);
        executorService.submit(executor);
    }
View Full Code Here

          case uima:
          case unspecified:
            processType = ProcessType.Job_Uima_AS_Process;
            break;
          }
          DuccProcess process = new DuccProcess(duccId, node, processType);
          long process_max_size_in_bytes = quantum_size_in_bytes * resource.countShares();
          CGroupManager.assign(duccWorkJob.getDuccId(), process, process_max_size_in_bytes);
          orchestratorCommonArea.getProcessAccounting().addProcess(duccId, duccWorkJob.getDuccId());
          processMap.addProcess(process);
          process.setResourceState(ResourceState.Allocated);
          logger.info(methodName, duccWorkJob.getDuccId(), messages.fetch("resource added")
                        +" "+messages.fetchLabel("process")+duccId.getFriendly()
                        +" "+messages.fetchLabel("unique")+duccId.getUnique()
                        +" "+messages.fetchLabel("name")+nodeId.getName()
                        +" "+messages.fetchLabel("ip")+nodeId.getIp());
          changes++;
          // check on usefulness of recent allocation
          switch(duccWorkJob.getJobState()) {
          // allocation unnecessary if job is already completed
          case Completing:
          case Completed:
            process.setResourceState(ResourceState.Deallocated);
            process.setProcessDeallocationType(ProcessDeallocationType.Voluntary);
            process.advanceProcessState(ProcessState.Stopped);
            logger.warn(methodName, duccWorkJob.getDuccId(),
                messages.fetch("resource allocated for completed job")
                +" "+
                messages.fetchLabel("process")+duccId.getFriendly()
                );
            break;
          default:
            // allocation unnecessary if job has excess capacity
            if(isExcessCapacity(duccWorkJob,driverStatusReportMap.get(duccId))) {
              process.setResourceState(ResourceState.Deallocated);
              process.setProcessDeallocationType(ProcessDeallocationType.Voluntary);
              process.advanceProcessState(ProcessState.Stopped);
              logger.warn(methodName, duccWorkJob.getDuccId(),
                  messages.fetch("resource allocated for over capacity job")
                  +" "+
                  messages.fetchLabel("process")+duccId.getFriendly()
                  );
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.transport.event.common.DuccProcess

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.