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

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


      job.setCommandLine(pipelineCommandLine);
    }
    else {
      // ducclet (sometimes known as arbitrary process)
      String process_executable = jobRequestProperties.getProperty(JobSpecificationProperties.key_process_executable);
      NonJavaCommandLine executableProcessCommandLine = new NonJavaCommandLine(process_executable);
      String processEnvironmentVariables = jobRequestProperties.getProperty(JobSpecificationProperties.key_environment);
      int envCountProcess = addEnvironment(job, "process", executableProcessCommandLine, processEnvironmentVariables);
      logger.info(methodName, job.getDuccId(), "process env vars: "+envCountProcess);
      logger.debug(methodName, job.getDuccId(), "ducclet: "+executableProcessCommandLine.getCommandLine());
      job.setCommandLine(executableProcessCommandLine);
      // Tokenize arguments string and strip any quotes, then add to command line.
      // Note: placeholders replaced by CLI so can avoid the add method.
      List<String> process_executable_arguments = QuotedOptions.tokenizeList(
              jobRequestProperties.getProperty(JobSpecificationProperties.key_process_executable_args), true);
      executableProcessCommandLine.getArguments().addAll(process_executable_arguments);
    }
    // process_initialization_failures_cap
    String failures_cap = jobRequestProperties.getProperty(JobSpecificationProperties.key_process_initialization_failures_cap);
    try {
      long process_failures_cap = Long.parseLong(failures_cap);
View Full Code Here


       
        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");
View Full Code Here

            // 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) {
View Full Code Here

TOP

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

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.