@Test public void findHadoopCommand_both() { putExec("home/bin/hadoop"); putExec("path/hadoop"); Map<String, String> envp = new HashMap<>(); envp.put("HADOOP_HOME", new File(folder.getRoot(), "home").getAbsolutePath()); envp.put("PATH", new File(folder.getRoot(), "path").getAbsolutePath()); File file = ConfigurationProvider.findHadoopCommand(envp); assertThat(file, is(notNullValue())); assertThat(file.toString(), file.canExecute(), is(true)); assertThat(file.toString(), file.getParentFile().getName(), is("bin")); }
public static File findHadoopCommand() { return findHadoopCommand(System.getenv()); }
ConfigurationProvider { public static File findHadoopCommand() { return findHadoopCommand(System.getenv()); } }
ConfigurationProvider { public static File findHadoopCommand() { return findHadoopCommand(System.getenv()); } ConfigurationProvider();   ConfigurationProvider(Map<String, String> envp);  ConfigurationProvider(URL defaultConfigPath); }
ConfigurationProvider { public static File findHadoopCommand() { return findHadoopCommand(System.getenv()); } ConfigurationProvider();   ConfigurationProvider(Map<String, String> envp);  ConfigurationProvider(URL defaultConfigPath); static URL getConfigurationPath(Map<String, String> environmentVariables); static File findHadoopCommand(); static File findHadoopCommand(Map<String, String> environmentVariables); Configuration newInstance(); }
ConfigurationProvider { public static File findHadoopCommand() { return findHadoopCommand(System.getenv()); } ConfigurationProvider();   ConfigurationProvider(Map<String, String> envp);  ConfigurationProvider(URL defaultConfigPath); static URL getConfigurationPath(Map<String, String> environmentVariables); static File findHadoopCommand(); static File findHadoopCommand(Map<String, String> environmentVariables); Configuration newInstance();  }