[ 
https://issues.apache.org/jira/browse/AMBARI-25212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

JaySenSharma updated AMBARI-25212:
----------------------------------
    Description: 
The output of the API call and the Config.py call should look identical. 

However "Config.py" is not returning the properties in the *Same Sorted Order* 
which Ambari APIs are actually returning. 
{code}
#  /var/lib/ambari-server/resources/scripts/configs.py --user=admin 
--password=admin --port=8080 --action=get --host=localhost --cluster=KerLatest 
--config-type=hive-site -f /tmp/hive-site-using-ConfigPy.json
{code}

However when the same is accessed via the Ambari API calls then the properties 
are in Sorted Order:
{code}
# curl -u admin:admin -H "X-Requested-By: ambari" -X GET 
"http://kerlatest1.example.com:8080/api/v1/clusters/KerLatest/configurations?type=hive-site&tag=version1550835190608";
  -o /tmp/hive-site-using-AmbariAPI.json
{code}


Ambari API returns the config properties inside JSON file in sorted order. But 
"configs.py" jumbles those properties. Ideally configs.py output should be in 
sync of API JSON response.

  was:
The output of the API call and the Config.py call should look identical. 

However "Config.py" is not returning the properties in the *Same Sorted Order* 
which Ambari APIs are actually returning. 
{code}
#  /var/lib/ambari-server/resources/scripts/configs.py --user=admin 
--password=admin --port=8080 --action=get --host=localhost --cluster=KerLatest 
--config-type=hive-site -f /tmp/hive-site-using-ConfigPy.json
{code}

However when the same is accessed via the Ambari API calls then the properties 
are in Sorted Order:
{code}
# curl -u admin:admin -H "X-Requested-By: ambari" -X GET 
"http://kerlatest1.example.com:8080/api/v1/clusters/KerLatest/configurations?type=hive-site&tag=version1550835190608";
  -o /tmp/hive-site-using-AmbariAPI.json
{code}




> configs.py  output and Ambari API output of config properties are not in same 
> sorted order.
> -------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-25212
>                 URL: https://issues.apache.org/jira/browse/AMBARI-25212
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: trunk
>            Reporter: JaySenSharma
>            Assignee: JaySenSharma
>            Priority: Major
>         Attachments: hive-site-using-AmbariAPI.json, 
> hive-site-using-ConfigPy.json
>
>
> The output of the API call and the Config.py call should look identical. 
> However "Config.py" is not returning the properties in the *Same Sorted 
> Order* which Ambari APIs are actually returning. 
> {code}
> #  /var/lib/ambari-server/resources/scripts/configs.py --user=admin 
> --password=admin --port=8080 --action=get --host=localhost 
> --cluster=KerLatest --config-type=hive-site -f 
> /tmp/hive-site-using-ConfigPy.json
> {code}
> However when the same is accessed via the Ambari API calls then the 
> properties are in Sorted Order:
> {code}
> # curl -u admin:admin -H "X-Requested-By: ambari" -X GET 
> "http://kerlatest1.example.com:8080/api/v1/clusters/KerLatest/configurations?type=hive-site&tag=version1550835190608";
>   -o /tmp/hive-site-using-AmbariAPI.json
> {code}
> Ambari API returns the config properties inside JSON file in sorted order. 
> But "configs.py" jumbles those properties. Ideally configs.py output should 
> be in sync of API JSON response.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to