Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Ambari ApI to get the properties of Service HIVE , type : hive-site , tag : version is not working

avatar
Rising Star

Hi Team ,

I am very much need of this API ,

In my HWX cluster where I am running the below API

curl -H "X-Requested-By: ambari" -X GET -u user:passwd http://<hostname>/api/v1/clusters/hdp-iaas-dev29/configurations?type=hive-site&tag=version1479808700...

This API has to provide me the hive-site properties but its just giving me the list of versions only without properties

"href" : "http:/<hostname>:8080/api/v1/clusters/hdp-iaas-dev29/configurations?type=hive-site&tag=version1479808700260", "tag" : "version1479808700260", "type" : "hive-site", "version" : 6, "Config" : { "cluster_name" : "hdp-iaas-dev29", "stack_id" : "HDP-2.3" } },

{ "href" : "http://hdp-iaas-dev29-control01.dev:8080/api/v1/clusters/hdp-iaas-dev29/configurations?type=hive-site&tag=version1479808700261", "tag" : "version1479808700261", "type" : "hive-site", "version" : 7, "Config" : { "cluster_name" : "hdp-iaas-dev29", "stack_id" : "HDP-2.3" } },

I took the help of below URLs and tried but no luck as of now

https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/configuration.md

https://cwiki.apache.org/confluence/display/AMBARI/Modify+configurations

Can someone correct me the API to get the properties of type : hive-site only .

I tried this API

curl -H "X-Requested-By: ambari" -X GET -u user:passwd http://hdp-iaas-dev29-control01.dev:8080/api/v1/clusters/hdp-iaas-dev29/configurations/service_confi...

which is giving me entire hive config which I don't want .

Thanks ,

Hari Kishore Javvaji

1 ACCEPTED SOLUTION

avatar
Not applicable

@hari Kishore javvaji

Did you try running it as following:

curl -H "X-Requested-By: ambari" -X GET -u hdp-iaas-admin:thinkbig http://hdp-iaas-dev29-control01.dev:8080/api/v1/clusters/hdp-iaas-dev29/configurations?type=hive-sit...

.

I used a (\) escape character before the "&" in the curl command.

INCORRECT

type=hive-site&tag=version1479808700260

CORRECT

type=hive-site\&tag=version1479808700260

View solution in original post

2 REPLIES 2

avatar
Not applicable

@hari Kishore javvaji

Did you try running it as following:

curl -H "X-Requested-By: ambari" -X GET -u hdp-iaas-admin:thinkbig http://hdp-iaas-dev29-control01.dev:8080/api/v1/clusters/hdp-iaas-dev29/configurations?type=hive-sit...

.

I used a (\) escape character before the "&" in the curl command.

INCORRECT

type=hive-site&tag=version1479808700260

CORRECT

type=hive-site\&tag=version1479808700260

avatar
Rising Star

Thanks JSS for your quick comeback!!

I corrected and It worked now .

Its good if someone can modify the WIKI https://cwiki.apache.org/confluence/display/AMBARI/Modify+configurations

to avoid confusions for a starter like me