THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Ambari should contain everything we need to flesh out a full topology from a minimal description of what resources that we want exposed and how we want access to those resources protected.
3.1 Apache Ambari API
- TODO: provide API details with example responses
...
These are some excerpts of responses from the Ambari REST API which can be employed for topology discovery:
(CLUSTER_NAME is a placeholder for an actual cluster name)
Identifying Clusters - /api/v1/clusters
Code Block | ||
---|---|---|
| ||
{
"href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/",
"items" : [
{
"href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/CLUSTER_NAME",
"Clusters" : {
"cluster_name" : "CLUSTER_NAME",
"version" : "HDP-2.6"
}
}
]
} |
Service Component To Host Mapping - /api/v1/clusters/CLUSTER_NAME/services?fields=components/host_components/HostRoles
Code Block | ||
---|---|---|
| ||
“items” : [
{
“href” : "http://AMBARI_ADDRESS/api/v1/CLUSTER_NAME/CLUSTER_NAME/services/HIVE",
“components” : [
{
“ServiceComponentInfo” : { },
“host_components” : [
{
“HostRoles” : {
“cluster_name” : “CLUSTER_NAME”,
“component_name” : “HCAT”,
“host_name” : “c6402.ambari.apache.org”
}
}
]
},
{
“ServiceComponentInfo” : { },
“host_components” : [
{
“HostRoles” : {
“cluster_name” : “CLUSTER_NAME”,
“component_name” : “HIVE_SERVER”,
“host_name” : “c6402.ambari.apache.org”
}
}
]
}
]
},
{
“href” : "http://AMBARI_ADDRESS/api/v1/CLUSTER_NAME/CLUSTER_NAME/services/HDFS",
“ServiceInfo” : {},
“components” : [
{
“ServiceComponentInfo” : { },
“host_components” : [
{
“HostRoles” : {
“cluster_name” : “CLUSTER_NAME”,
“component_name” : “NAMENODE”,
“host_name” : “c6401.ambari.apache.org”
}
}
]
}
]
}
] |
Service Configuration Details (Active Versions) - /api/v1/clusters/ CLUSTER_NAME /configurations/service_config_versions?is_current=true
Code Block | ||
---|---|---|
| ||
"items" : [
{
"href" : "http://AMBARI_ADDRESS/api/v1/clusters/CLUSTER_NAME/configurations/service_config_versions?service_name=HDFS&service_config_version=2",
"cluster_name" : "CLUSTER_NAME",
"configurations" : [
{
"Config" : {
"cluster_name" : "CLUSTER_NAME",
"stack_id" : "HDP-2.6"
},
"type" : "ssl-server",
"properties" : {
"ssl.server.keystore.location" : "/etc/security/serverKeys/keystore.jks",
"ssl.server.keystore.password" : "SECRET:ssl-server:1:ssl.server.keystore.password",
"ssl.server.keystore.type" : "jks",
"ssl.server.truststore.location" : "/etc/security/serverKeys/all.jks",
"ssl.server.truststore.password" : "SECRET:ssl-server:1:ssl.server.truststore.password"
},
"properties_attributes" : { }
},
{
"Config" : {
"cluster_name" : "CLUSTER_NAME",
"stack_id" : "HDP-2.6"
},
"type" : "hdfs-site",
"tag" : "version1",
"version" : 1,
"properties" : {
"dfs.cluster.administrators" : " hdfs",
"dfs.encrypt.data.transfer.cipher.suites" : "AES/CTR/NoPadding",
"dfs.hosts.exclude" : "/etc/hadoop/conf/dfs.exclude",
"dfs.http.policy" : "HTTP_ONLY",
"dfs.https.port" : "50470",
"dfs.journalnode.http-address" : "0.0.0.0:8480",
"dfs.journalnode.https-address" : "0.0.0.0:8481",
"dfs.namenode.http-address" : "c6401.ambari.apache.org:50070",
"dfs.namenode.https-address" : "c6401.ambari.apache.org:50470",
"dfs.namenode.rpc-address" : "c6401.ambari.apache.org:8020",
"dfs.namenode.secondary.http-address" : "c6402.ambari.apache.org:50090",
"dfs.webhdfs.enabled" : "true"
},
"properties_attributes" : {
"final" : {
"dfs.webhdfs.enabled" : "true",
"dfs.namenode.http-address" : "true",
"dfs.support.append" : "true",
"dfs.namenode.name.dir" : "true",
"dfs.datanode.failed.volumes.tolerated" : "true",
"dfs.datanode.data.dir" : "true"
}
}
}
]
},
{
"href" : "http://AMBARI_ADDRESS/api/v1/clusters/CLUSTER_NAME/configurations/service_config_versions?service_name=YARN&service_config_version=1",
"cluster_name" : "CLUSTER_NAME",
"configurations" : [
{
"Config" : {
"cluster_name" : "CLUSTER_NAME",
"stack_id" : "HDP-2.6"
},
"type" : "yarn-site",
"properties" : {
"yarn.http.policy" : "HTTP_ONLY",
"yarn.log.server.url" : "http://c6402.ambari.apache.org:19888/jobhistory/logs",
"yarn.log.server.web-service.url" : "http://c6402.ambari.apache.org:8188/ws/v1/applicationhistory",
"yarn.nodemanager.address" : "0.0.0.0:45454",
"yarn.resourcemanager.address" : "c6402.ambari.apache.org:8050",
"yarn.resourcemanager.admin.address" : "c6402.ambari.apache.org:8141",
"yarn.resourcemanager.ha.enabled" : "false",
"yarn.resourcemanager.hostname" : "c6402.ambari.apache.org",
"yarn.resourcemanager.webapp.address" : "c6402.ambari.apache.org:8088",
"yarn.resourcemanager.webapp.delegation-token-auth-filter.enabled" : "false",
"yarn.resourcemanager.webapp.https.address" : "c6402.ambari.apache.org:8090",
},
"properties_attributes" : { }
},
]
},
] |
Cluster Service Components - /api/v1/clusters/CLUSTER_NAME/components
Code Block | ||
---|---|---|
| ||
"items" : [
{
"href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/CLUSTER_NAME/components/HCAT",
"ServiceComponentInfo" : {
"cluster_name" : "CLUSTER_NAME",
"component_name" : "HCAT",
"service_name" : "HIVE"
}
},
{
"href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/CLUSTER_NAME/components/HIVE_SERVER",
"ServiceComponentInfo" : {
"cluster_name" : "CLUSTER_NAME",
"component_name" : "HIVE_SERVER",
"service_name" : "HIVE"
}
},
{
"href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/CLUSTER_NAME/components/NAMENODE",
"ServiceComponentInfo" : {
"cluster_name" : "CLUSTER_NAME",
"component_name" : "NAMENODE",
"service_name" : "HDFS"
}
},
{
"href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/CLUSTER_NAME/components/OOZIE_SERVER",
"ServiceComponentInfo" : {
"cluster_name" : "CLUSTER_NAME",
"component_name" : "OOZIE_SERVER",
"service_name" : "OOZIE"
}
}
] |
3.2 Zookeeper Service Registry
...