@Test public void testOverride() { Config testConfig = ConfigFactory.parseMap(ImmutableMap.<String, Object>builder() .put("c.d", "1") .put("e.f", "2") .put("hadoop-inject.a.b.c.ROOT", "2") .put("hadoop-inject.a.b.c.d", "3") .put("hadoop-inject.e.f", "4") .build()); HadoopConfigLoader configLoader = new HadoopConfigLoader(testConfig); Configuration conf1 = configLoader.getConf(); Assert.assertEquals(conf1.get("a.b.c"), "2"); Assert.assertEquals(conf1.get("a.b.c.d"), "3"); Assert.assertEquals(conf1.get("e.f"), "4"); conf1.set("e.f", "5"); Assert.assertEquals(conf1.get("e.f"), "5"); Configuration conf2 = configLoader.getConf(); Assert.assertEquals(conf2.get("a.b.c"), "2"); Assert.assertEquals(conf2.get("a.b.c.d"), "3"); Assert.assertEquals(conf2.get("e.f"), "4"); }
public Configuration getConf() { return new Configuration(_conf); }
HadoopConfigLoader { public Configuration getConf() { return new Configuration(_conf); } }
HadoopConfigLoader { public Configuration getConf() { return new Configuration(_conf); } HadoopConfigLoader();  HadoopConfigLoader(Config rootConfig); }
HadoopConfigLoader { public Configuration getConf() { return new Configuration(_conf); } HadoopConfigLoader();  HadoopConfigLoader(Config rootConfig); Configuration getConf(); }
HadoopConfigLoader { public Configuration getConf() { return new Configuration(_conf); } HadoopConfigLoader();  HadoopConfigLoader(Config rootConfig); Configuration getConf(); static final String HADOOP_CONF_OVERRIDES_ROOT; static final String STRIP_SUFFIX; }