/** * @param binName the binary to look for (eg 'kudu-tserver') * @return the absolute path of that binary * @throws FileNotFoundException if no such binary is found */ public static String findBinary(String binName) throws FileNotFoundException { String binDir = findBinaryDir(); File candidate = new File(binDir, binName); if (candidate.canExecute()) { return candidate.getAbsolutePath(); } throw new FileNotFoundException("Cannot find binary " + binName + " in binary directory " + binDir); } }
KuduBinaryLocator.findBinary("kudu"), "test", "mini_cluster",