YARN-9775. RMWebServices /scheduler-conf GET returns all hadoop configurations for ZKConfigurationStore. Contributed by Prabhu Joseph
(cherry picked from commit 8660e48ca1
)
This commit is contained in:
parent
7f20c31e31
commit
e4249c3202
|
@ -196,7 +196,7 @@ public class ZKConfigurationStore extends YarnConfigurationStore {
|
||||||
try {
|
try {
|
||||||
Map<String, String> map =
|
Map<String, String> map =
|
||||||
(HashMap<String, String>) deserializeObject(serializedSchedConf);
|
(HashMap<String, String>) deserializeObject(serializedSchedConf);
|
||||||
Configuration c = new Configuration();
|
Configuration c = new Configuration(false);
|
||||||
for (Map.Entry<String, String> e : map.entrySet()) {
|
for (Map.Entry<String, String> e : map.entrySet()) {
|
||||||
c.set(e.getKey(), e.getValue());
|
c.set(e.getKey(), e.getValue());
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,8 @@ public class TestZKConfigurationStore extends ConfigurationStoreBaseTest {
|
||||||
confStore.initialize(conf, schedConf, rmContext);
|
confStore.initialize(conf, schedConf, rmContext);
|
||||||
assertEquals("val", confStore.retrieve().get("key"));
|
assertEquals("val", confStore.retrieve().get("key"));
|
||||||
|
|
||||||
|
assertNull(confStore.retrieve().get(YarnConfiguration.RM_HOSTNAME));
|
||||||
|
|
||||||
// Create a new configuration store, and check for old configuration
|
// Create a new configuration store, and check for old configuration
|
||||||
confStore = createConfStore();
|
confStore = createConfStore();
|
||||||
schedConf.set("key", "badVal");
|
schedConf.set("key", "badVal");
|
||||||
|
|
Loading…
Reference in New Issue