Created 11-18-2018 07:07 PM
hi all
how to get the number of CPU on each data node by REST API?
I also tried this but get error about:
[root@master02 ~]# curl -u admin:admin -sS -G "https://master02:8080/api/v1/clusters/HDP/services/HDFS/components/DATANODE" curl: (35) SSL received a record that exceeded the maximum permissible length.
Created 11-18-2018 09:38 PM
You can try making the following kind of API call:
# curl -H "X-Requested-By: ambari" -u admin:admin -X GET "http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts?fields=Hosts/host_name,Hosts/public_host_name,Hosts/cpu_count&host_compnents/HostRoles/component_name.in(DATANODE)"
.
Please replace the following (in addition to cre4dentials)
newhwx1.example.com:8080 => Ambari Server URL
NewCluster => Your ClusterName
.
Also if you are running your Abari Server on "HTTPS" secure port then please make sure that you are are appending "-k" in the curl command like:
# curl -k -H "X-Requested-By: ambari" ......
.
Created 11-18-2018 09:38 PM
You can try making the following kind of API call:
# curl -H "X-Requested-By: ambari" -u admin:admin -X GET "http://newhwx1.example.com:8080/api/v1/clusters/NewCluster/hosts?fields=Hosts/host_name,Hosts/public_host_name,Hosts/cpu_count&host_compnents/HostRoles/component_name.in(DATANODE)"
.
Please replace the following (in addition to cre4dentials)
newhwx1.example.com:8080 => Ambari Server URL
NewCluster => Your ClusterName
.
Also if you are running your Abari Server on "HTTPS" secure port then please make sure that you are are appending "-k" in the curl command like:
# curl -k -H "X-Requested-By: ambari" ......
.
Created 11-18-2018 11:06 PM
@Jay chould you please help me with the follwing thred - https://community.hortonworks.com/questions/226622/rest-api-how-to-verify-the-max-value-for-each-par...