@Override String[] linkCount(File file) throws IOException { // trigger the check for winutils Shell.getWinUtilsFile(); String[] buf = new String[getLinkCountCommand.length]; System.arraycopy(getLinkCountCommand, 0, buf, 0, getLinkCountCommand.length); buf[getLinkCountCommand.length - 1] = file.getCanonicalPath(); return buf; } }
String getSystemInfoInfoFromShell() { try { ShellCommandExecutor shellExecutor = new ShellCommandExecutor( new String[] {Shell.getWinUtilsFile().getCanonicalPath(), "systeminfo" }); shellExecutor.execute(); return shellExecutor.getOutput(); } catch (IOException e) { LOG.error(StringUtils.stringifyException(e)); } return null; }
winutilsPath = Shell.getWinUtilsFile().getCanonicalPath(); winutilsExists = true; } catch (IOException e) {
@Override String[] linkCount(File file) throws IOException { // trigger the check for winutils Shell.getWinUtilsFile(); String[] buf = new String[getLinkCountCommand.length]; System.arraycopy(getLinkCountCommand, 0, buf, 0, getLinkCountCommand.length); buf[getLinkCountCommand.length - 1] = file.getCanonicalPath(); return buf; } }
/** * * @return true if we already have the property env "hadoop.home.dir", or we succeed finding a good value for it */ public static boolean isHadoopReady() { if (Shell.WINDOWS) { try { if (Shell.getWinUtilsFile().isFile()) { return true; } } catch (FileNotFoundException e) { // https://wiki.apache.org/hadoop/WindowsProblems LOGGER.trace("Wintutils seems to be missing", e); } } // If we get here, it means winutils is missing LOGGER.error( "Haddop winutils seems not installed. They can be checked-out from 'git clone https://github.com/steveloughran/winutils.git'"); return false; } }
/** * * @return true if we already have the property env "hadoop.home.dir", or we succeed finding a good value for it */ public static boolean isHadoopReady() { if (Shell.WINDOWS) { try { if (Shell.getWinUtilsFile().isFile()) { return true; } } catch (FileNotFoundException e) { // https://wiki.apache.org/hadoop/WindowsProblems LOGGER.trace("Wintutils seems to be missing", e); } } // If we get here, it means winutils is missing LOGGER.error( "Haddop winutils seems not installed. They can be checked-out from 'git clone https://github.com/steveloughran/winutils.git'"); return false; } }
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; }
String getSystemInfoInfoFromShell() { try { ShellCommandExecutor shellExecutor = new ShellCommandExecutor( new String[] {Shell.getWinUtilsFile().getCanonicalPath(), "systeminfo" }); shellExecutor.execute(); return shellExecutor.getOutput(); } catch (IOException e) { LOG.error(StringUtils.stringifyException(e)); } return null; }