YARN-9775. RMWebServices /scheduler-conf GET returns all hadoop configurations for ZKConfigurationStore. Contributed by Prabhu Joseph

(cherry picked from commit 8660e48ca1)
(cherry picked from commit e4249c3202)
(cherry picked from commit 6baa0d1e4d)
This commit is contained in:
Jonathan Hung 2019-08-26 15:45:13 -07:00
parent e786147096
commit f083f7fef1
2 changed files with 3 additions and 1 deletions

View File

@ -196,7 +196,7 @@ public class ZKConfigurationStore extends YarnConfigurationStore {
try {
Map<String, String> map =
(HashMap<String, String>) deserializeObject(serializedSchedConf);
Configuration c = new Configuration();
Configuration c = new Configuration(false);
for (Map.Entry<String, String> e : map.entrySet()) {
c.set(e.getKey(), e.getValue());
}

View File

@ -117,6 +117,8 @@ public class TestZKConfigurationStore extends ConfigurationStoreBaseTest {
confStore.initialize(conf, schedConf, rmContext);
assertEquals("val", confStore.retrieve().get("key"));
assertNull(confStore.retrieve().get(YarnConfiguration.RM_HOSTNAME));
// Create a new configuration store, and check for old configuration
confStore = createConfStore();
schedConf.set("key", "badVal");