Ambari的API调用
2024-10-20 00:26:47
GET api/v1/clusters/HDP/configurations可以获得所有的配置信息(例如,http://hdp0:8080/api/v1/clusters/HDP/configurations);但是只是一级信息;
比如我想要获得yarn的scheduler的节点信息,将会找到:
{
"href" : "http://hdp0:8080/api/v1/clusters/HDP/configurations?type=capacity-scheduler&tag=version1",
"tag" : "version1",
"type" : "capacity-scheduler",
"version" : 1,
"Config" : {
"cluster_name" : "HDP",
"stack_id" : "HDP-2.6"
}
}
这里注意,type就是配置页面的配置项的名称,在配置页面中该配置项为“Capacity Scheduler”,处理的时候,中间的空格处理为"-",全字小写即使节点名称。然后,通过访问href指定的链接:http://hdp0:8080/api/v1/clusters/HDP/configurations?type=capacity-scheduler&tag=version1就可以看到该配置的详细信息
{
"href" : "http://hdp0:8080/api/v1/clusters/HDP/configurations?type=capacity-scheduler&tag=version1",
"items" : [
{
"href" : "http://hdp0:8080/api/v1/clusters/HDP/configurations?type=capacity-scheduler&tag=version1",
"tag" : "version1",
"type" : "capacity-scheduler",
"version" : 1,
"Config" : {
"cluster_name" : "HDP",
"stack_id" : "HDP-2.6"
},
"properties" : {
"capacity-scheduler" : "null",
"yarn.scheduler.capacity.default.minimum-user-limit-percent" : "100",
"yarn.scheduler.capacity.maximum-am-resource-percent" : "0.2",
"yarn.scheduler.capacity.maximum-applications" : "10000",
"yarn.scheduler.capacity.node-locality-delay" : "40",
"yarn.scheduler.capacity.resource-calculator" : "org.apache.hadoop.yarn.util.resource.DefaultResourceCalculator",
"yarn.scheduler.capacity.root.accessible-node-labels" : "*",
"yarn.scheduler.capacity.root.acl_administer_queue" : "*",
"yarn.scheduler.capacity.root.capacity" : "100",
"yarn.scheduler.capacity.root.default.acl_administer_jobs" : "*",
"yarn.scheduler.capacity.root.default.acl_submit_applications" : "*",
"yarn.scheduler.capacity.root.default.capacity" : "100",
"yarn.scheduler.capacity.root.default.maximum-capacity" : "100",
"yarn.scheduler.capacity.root.default.state" : "RUNNING",
"yarn.scheduler.capacity.root.default.user-limit-factor" : "1",
"yarn.scheduler.capacity.root.queues" : "default"
}
}
]
}
最新文章
- C#异步调用的方法
- java 计算地球上两点间距离
- ndk学习7: 使用静态库
- sharepoint修改密码
- NGINX+UWSGI部署生产的DJANGO代码
- Trafic
- 如何在 静态编译的QT 5.5.1 中 使用数据库插件连接 ODBC(调用静态插件)
- 【转】MapReduce的优化
- 使用matplotlib绘制多轴图
- angularJS+Ionic移动端图片上传的解决办法
- ModuleNotFoundError: No module named '_sqlite3' -- python2.7 问题
- 2019年IntelliJ IDEA 最新注册码,亲测可用(截止到2020年3月11日)
- python算法博客推荐
- lua脚本之lua语言简介以及lua的安装
- SettingsTortoiseSVN
- Git 进阶操作(一)
- Kafka自我学习-报错篇
- saltstack内置执行模块useradd
- 在YUV图像上根据背景色实现OSD反色
- 韩顺平循序渐进学JAVA从入门到精通 视频全套,需要的联系我