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 = ProcessExecutionUtility.createProcessExecution(startScript);
} else {
startScript = new File(binDir, "cassandra");
startScriptExe = ProcessExecutionUtility.createProcessExecution(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;