通过yarn rest api 可以快速查看flink job情况,以便排查问题
或者维护到项目中,实现对flink job运行状态的实时把控,可以指导job的下一步操作
文章目录
一、yarn rest API
1. 常用yarn rest API
序号 | 功能 | rest api |
---|---|---|
1 | 某个app的详情 | http://resourceManager:port/ws/v1/cluster/apps/appIdxxx |
2 | 某个app的概览 | http://resourceManager:port/proxy/appIDxxx/jobs/overview/?user.name=hadoop |
3 | 某个app的页面详情 | http://resourceManager:port/cluster/app/appIDxxx |
4 | 查看集群运行的指标 | http://resourceManager:port/ws/v1/cluster/metrics |
5 | 查看集群调度详情 | http://resourceManager:port/ws/v1/cluster/scheduler |
6 | 查看某个队列下的所有app | http://resourceManager:port/ws/v1/cluster/apps?queue=root |
7 | 某个状态下所有app详情 | http://resourceManager:port/ws/v1/cluster/apps?state=FAILED http://resourceManager:port/cluster/apps/KILLED |
2. 使用展示
2.1. 某个app的详情
curl http://10.0.1.125:8088/ws/v1/cluster/apps/application_1655470622932_0039
2.2. 某个app的概览
curl http://10.0.1.125:8088/proxy/application_1653125869458_0056/jobs/overview/?user.name=hadoop
2.3. 某个app的页面详情
直接通过浏览器访问
http://10.0.1.125:8088/cluster/app/application_1655470622932_0039
2.4. 查看集群运行的指标
http://10.0.1.125:8088/ws/v1/cluster/metrics
2.5. 查看集群调度详情
http://10.0.1.125:8088/ws/v1/cluster/scheduler
2.6. 查看某个队列下的所有app
http://10.0.1.125:8088/ws/v1/cluster/apps?queue=root
2.7. 某个状态下所有app详情
curl http://10.0.1.125:8088/ws/v1/cluster/apps?state=FAILED
页面上快速查看
http://10.0.1.125:8088/cluster/apps/KILLED