云计算百科
云计算领域专业知识百科平台

yarn任务筛选spark任务,判断内存/CPU使用超过限制任务

yarn任务筛选spark任务,判断内存/CPU使用超过限制任务 curl -s “http://it-cdh-node01:8088/ws/v1/cluster/apps?states=RUNNING” | jq ‘.apps.app | map(select(.applicationType == “SPARK” ) | select(.allocatedMB >= 102400 or .allocatedVCores >= 50) | { id, name, allocatedMB, allocatedVCores, elapsedTime })’ >> /data03/jq/sparkjoblog

curl -s “http://it-cdh-node01:8088/ws/v1/cluster/apps?states=RUNNING” | jq ‘.apps.app | map(select(.applicationType == “SPARK” ) | select(.allocatedMB >= 102400 or .allocatedVCores >= 50) | { id, name, allocatedMB, allocatedVCores })’

curl -s “http://it-cdh-node01:8088/ws/v1/cluster/apps?states=RUNNING” | jq ‘select(.apps.app[].applicationType = “SPARK”) | .apps.app[].id’ | xargs -I {} curl -s “http://it-cdh-node01:8088/ws/v1/cluster/apps/{}” | jq ‘select(.app.allocatedMB >= 102400 or .app.allocatedVCores >= 50) | .app.id, .app.name, .app.allocatedMB, .app.allocatedVCores’

赞(0)
未经允许不得转载:网硕互联帮助中心 » yarn任务筛选spark任务,判断内存/CPU使用超过限制任务
分享到: 更多 (0)

评论 抢沙发

评论前必须登录!