use of org.apache.htrace.core.HTraceConfiguration in project hadoop by apache.
the class TestTraceUtils method testExtraConfig.
@Test
public void testExtraConfig() {
String key = "test.extra.config";
String oldValue = "old value";
String newValue = "new value";
Configuration conf = new Configuration();
conf.set(TEST_PREFIX + key, oldValue);
LinkedList<ConfigurationPair> extraConfig = new LinkedList<ConfigurationPair>();
extraConfig.add(new ConfigurationPair(TEST_PREFIX + key, newValue));
HTraceConfiguration wrapped = TraceUtils.wrapHadoopConf(TEST_PREFIX, conf, extraConfig);
assertEquals(newValue, wrapped.get(key));
}
use of org.apache.htrace.core.HTraceConfiguration in project hadoop by apache.
the class TestTraceUtils method testWrappedHadoopConf.
@Test
public void testWrappedHadoopConf() {
String key = "sampler";
String value = "ProbabilitySampler";
Configuration conf = new Configuration();
conf.set(TEST_PREFIX + key, value);
HTraceConfiguration wrapped = TraceUtils.wrapHadoopConf(TEST_PREFIX, conf);
assertEquals(value, wrapped.get(key));
}
Aggregations