@Test public void newInstance_cmd_etc() { File cmd = putExec("bin/hadoop"); putConf("etc/hadoop/core-site.xml"); Map<String, String> envp = new HashMap<>(); envp.put("HADOOP_CMD", cmd.getAbsolutePath()); Configuration conf = new ConfigurationProvider(envp).newInstance(); assertThat(isLoaded(conf), is(true)); }
public Configuration newInstance() { Configuration conf = new Configuration(true); conf.setClassLoader(loader); configure(conf); return conf; }
ConfigurationProvider { public Configuration newInstance() { Configuration conf = new Configuration(true); conf.setClassLoader(loader); configure(conf); return conf; } }
ConfigurationProvider { public Configuration newInstance() { Configuration conf = new Configuration(true); conf.setClassLoader(loader); configure(conf); return conf; } ConfigurationProvider();   ConfigurationProvider(Map<String, String> envp);  ConfigurationProvider(URL defaultConfigPath); }
ConfigurationProvider { public Configuration newInstance() { Configuration conf = new Configuration(true); conf.setClassLoader(loader); configure(conf); return conf; } 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 Configuration newInstance() { Configuration conf = new Configuration(true); conf.setClassLoader(loader); configure(conf); return conf; } 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();  }