public ProcessExecutionResults executeProcess(ProcessExecution processExecution) { // TODO: doesn't look like SIGAR has an API to fork/execute processes? fallback to using the Java way return SystemInfoFactory.createJavaSystemInfo().executeProcess(processExecution); }
public ProcessExecutionResults executeProcess(ProcessExecution processExecution) { // TODO: doesn't look like SIGAR has an API to fork/execute processes? fallback to using the Java way return SystemInfoFactory.createJavaSystemInfo().executeProcess(processExecution); }
private ProcessExecutionResults startNode(File basedir) { if (log.isDebugEnabled()) { log.debug("Starting node at " + basedir); } File binDir = new File(basedir, "bin"); File startScript; SystemInfo systemInfo = SystemInfoFactory.createSystemInfo(); ProcessExecution startScriptExe; if (systemInfo.getOperatingSystemType() == OperatingSystemType.WINDOWS) { startScript = new File(binDir, "cassandra.bat"); startScriptExe = createProcessExecution(null, startScript); } else { startScript = new File(binDir, "cassandra"); startScriptExe = createProcessExecution(null, startScript); startScriptExe.addArguments(Arrays.asList("-p", "cassandra.pid")); } startScriptExe.setWaitForCompletion(0); ProcessExecutionResults results = systemInfo.executeProcess(startScriptExe); if (log.isDebugEnabled()) { log.debug(startScript + " returned with exit code [" + results.getExitCode() + "]"); } return results; }
processExecution.setKillOnTimeout(true); ProcessExecutionResults results = systemInfo.executeProcess(processExecution); String versionOutput = results.getCapturedOutput();
return systemInfo.executeProcess(processExecution);
log.debug("About to execute the following process: [" + processExecution + "]"); ProcessExecutionResults results = this.systemInfo.executeProcess(processExecution); logExecutionResults(results); Throwable error = results.getError();
log.debug("About to execute the following process: [" + processExecution + "]"); ProcessExecutionResults results = this.systemInfo.executeProcess(processExecution); logExecutionResults(results); Throwable error = results.getError();