This is an automated email from the ASF dual-hosted git repository. amagyar pushed a commit to branch branch-2.7 in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/branch-2.7 by this push: new 6f5401d [AMBARI-25212] configs.py output and Ambari API output of config properties are not in same sorted order. (#2890) 6f5401d is described below commit 6f5401d7cae1d8a847a28aba7f9efa6f7ad97bfb Author: Jay Kumar SenSharma <jaysensha...@users.noreply.github.com> AuthorDate: Thu Mar 28 03:08:06 2019 +1100 [AMBARI-25212] configs.py output and Ambari API output of config properties are not in same sorted order. (#2890) --- ambari-server/src/main/resources/scripts/configs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ambari-server/src/main/resources/scripts/configs.py b/ambari-server/src/main/resources/scripts/configs.py index 7c7ca0f..5ce7392 100644 --- a/ambari-server/src/main/resources/scripts/configs.py +++ b/ambari-server/src/main/resources/scripts/configs.py @@ -20,6 +20,7 @@ limitations under the License. import optparse from optparse import OptionGroup +from collections import OrderedDict import sys import urllib2, ssl import time @@ -134,7 +135,7 @@ def get_current_config(cluster, config_type, accessor): config_tag = get_config_tag(cluster, config_type, accessor) logger.info("### on (Site:{0}, Tag:{1})".format(config_type, config_tag)) response = accessor(CONFIGURATION_URL.format(cluster, config_type, config_tag)) - config_by_tag = json.loads(response) + config_by_tag = json.loads(response, object_pairs_hook=OrderedDict) current_config = config_by_tag[ITEMS][0] return current_config[PROPERTIES], current_config.get(ATTRIBUTES, {})