Package org.apache.uima.ducc.transport.cmdline

Examples of org.apache.uima.ducc.transport.cmdline.ICommandLine


          ((ManagedProcess) managedProcess).getDuccProcess().getProcessState().equals(ProcessState.FailedInitialization)) {
        logger.info(methodName,((ManagedProcess)super.managedProcess).getDuccId(),">>>>>>>>>>>>>>> Killing Process:"+((ManagedProcess) managedProcess).getPid());
       
        if ( ((ManagedProcess) managedProcess).getDuccProcess().getProcessType().equals(ProcessType.Service) ||
          ((ManagedProcess) managedProcess).getDuccProcess().getProcessType().equals(ProcessType.Pop)) {
                ICommandLine cmdL;
                  if (Utils.isWindows()) {
                    cmdL = new NonJavaCommandLine("taskkill");
                    cmdL.addArgument("/PID");
                } else {
                    cmdL = new NonJavaCommandLine("/bin/kill");
                    if ( ((ManagedProcess) managedProcess).isJd() ) {
                      // kill JD hard.
                      cmdL.addArgument("-9");
                    } else {
                      cmdL.addArgument("-15");
                    }
                }
                cmdL.addArgument(((ManagedProcess) managedProcess).getDuccProcess().getPID());

//          String[] sigTermCmdLine = new String[] {"/bin/kill","-15",((ManagedProcess) managedProcess).getDuccProcess().getPID()};
                String[] sigTermCmdLine = getDeployableCommandLine(cmdL, new HashMap<String, String>());
                doExec(new ProcessBuilder(sigTermCmdLine), sigTermCmdLine, true);
        } else {
View Full Code Here


          processAdjustedMemorySize += (processAdjustedMemorySize * ((double)fudgeFactor/100));
          pma.setMaxMemoryWithFudge(processAdjustedMemorySize);
         
          logger.info(methodName,dcj.getDuccId(),"--------------- User Requested Memory For Process:"+dcj.getSchedulingInfo().getShareMemorySize()+dcj.getSchedulingInfo().getShareMemoryUnits()+" PM Calculated Memory Assignment of:"+processAdjustedMemorySize);
         
          ICommandLine driverCmdLine = null;
          IDuccProcess driverProcess = null;
          switch(dcj.getDuccType()) {
          case Job:
          
            driverCmdLine = dcj.getDriver().getCommandLine();
View Full Code Here

            // Agent will first send a stop request (via JMS) to the
            // process.
            // If the process doesnt stop within alloted window the
            // agent
            // will kill it hard
            ICommandLine cmdLine;
            try {
              if (Utils.isWindows()) {
                cmdLine = new NonJavaCommandLine("taskkill");
                cmdLine.addArgument("/PID");
              } else {
                cmdLine = new NonJavaCommandLine("/bin/kill");
                cmdLine.addArgument("-9");
              }
              cmdLine.addArgument(pid);
              launcher.launchProcess(this, getIdentity(), process, cmdLine, this, deployedProcess);
            } catch (Exception e) {
              logger.error(methodName, null, e);
            }
          } else if (!deployedProcess.getDuccProcess().getProcessState()
View Full Code Here

        //  look at the job's JD process and than JPs.
        for( IDuccJobDeployment jobDeployment : duccEvent.getJobList()) {
          //  check if this node is a target for this job's JD
          if ( isTargetNodeForProcess(jobDeployment.getJdProcess()) ) {
            // agent will check the state of JD process and either start, stop, or take no action
            ICommandLine jdCommandLine = jobDeployment.getJdCmdLine();
            if(jdCommandLine != null) {
              agent.reconcileProcessStateAndTakeAction(lifecycleController, jobDeployment.getJdProcess(), jobDeployment.getJdCmdLine(),
                jobDeployment.getStandardInfo(), jobDeployment.getProcessMemoryAssignment(), jobDeployment.getJobId());
            }
            else {
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.transport.cmdline.ICommandLine

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.