use of org.apache.hadoop.util.Shell.ShellCommandExecutor in project hadoop by apache.
the class WindowsBasedProcessTree method getAllProcessInfoFromShell.
// helper method to override while testing
String getAllProcessInfoFromShell() {
try {
ShellCommandExecutor shellExecutor = new ShellCommandExecutor(new String[] { Shell.getWinUtilsFile().getCanonicalPath(), "task", "processList", taskProcessId });
shellExecutor.execute();
return shellExecutor.getOutput();
} catch (IOException e) {
LOG.error(StringUtils.stringifyException(e));
}
return null;
}
Aggregations