- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
API + how to verify data node disk by API
- Labels:
-
Apache Ambari
-
Apache Hadoop
Created ‎12-19-2017 01:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
on ambari GUI by clicking on HDFS --> config --> (we can see the data node folders that actually represented the worker disks)
how to use API in order to capture the number of disks from the blueprint ?
Created ‎12-22-2017 03:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like you want to fetch the details of "dfs.datanode.data.dir" property. In that case you can try using the following call. (please revert back if you are talking about a slightly different property)
Syntax:
# curl -sH "X-Requested-By: ambari" -u admin:admin -X GET "http://$AMBARI_HOSTNAME:8080/api/v1/clusters/$CLUSTER_NAME/configurations/service_config_versions?service_name=HDFS&is_current=true" | grep "\"dfs.datanode.data.dir\""
Example:
# curl -sH "X-Requested-By: ambari" -u admin:admin -X GET "http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/configurations/service_config_versions?service_name=HDFS&is_current=true" | grep "\"dfs.datanode.data.dir\""
Output:
"dfs.datanode.data.dir" : "/hadoop/hdfs/data",
.
Please replace the "$AMBARI_HOSTNMAE" and "$CLUSTER_NAME" based on your environment.
.
Created ‎12-22-2017 03:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like you want to fetch the details of "dfs.datanode.data.dir" property. In that case you can try using the following call. (please revert back if you are talking about a slightly different property)
Syntax:
# curl -sH "X-Requested-By: ambari" -u admin:admin -X GET "http://$AMBARI_HOSTNAME:8080/api/v1/clusters/$CLUSTER_NAME/configurations/service_config_versions?service_name=HDFS&is_current=true" | grep "\"dfs.datanode.data.dir\""
Example:
# curl -sH "X-Requested-By: ambari" -u admin:admin -X GET "http://amb25101.example.com:8080/api/v1/clusters/plain_ambari/configurations/service_config_versions?service_name=HDFS&is_current=true" | grep "\"dfs.datanode.data.dir\""
Output:
"dfs.datanode.data.dir" : "/hadoop/hdfs/data",
.
Please replace the "$AMBARI_HOSTNMAE" and "$CLUSTER_NAME" based on your environment.
.
