Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 10-11-2017 12:46 AM
Hi,
I am looking for a Resource Manager metric where it emits metrics related to number of containers preempted, amount of preempted MB and Vcores.
I am able to get this metric from each application, but looking if resource manager can emit these metrics for each queue. I have searched through all the different metrics in AMS but it doesn't have it.
HDPv2.5.0 or Hadoopv2.7.3
Created 10-11-2017 09:44 AM
I don't think queue level preemption metrics exists. However, they are fairly easy to calculate from the app level metrics.
curl http://YOUR_RM_ADDRESS.com:8088/ws/v1/cluster/apps > /tmp/apps queues=$(cat /tmp/apps | jq '.apps.app[].queue' | sort -u) for queue in $queues; do echo $queue metrics="preemptedResourceMB preemptedResourceVCores numNonAMContainerPreempted numAMContainerPreempted" for metric in $metrics; do printf "%30s: " $metric cat /tmp/apps | jq -r ".apps.app[] | select(.queue == $queue) .$metric" | paste -s -d+ - | bc done done
Most likely there are more efficient ways to to do this calculation in higher level programming languages, or if you are a jq expert.
Created 10-11-2017 09:44 AM
I don't think queue level preemption metrics exists. However, they are fairly easy to calculate from the app level metrics.
curl http://YOUR_RM_ADDRESS.com:8088/ws/v1/cluster/apps > /tmp/apps queues=$(cat /tmp/apps | jq '.apps.app[].queue' | sort -u) for queue in $queues; do echo $queue metrics="preemptedResourceMB preemptedResourceVCores numNonAMContainerPreempted numAMContainerPreempted" for metric in $metrics; do printf "%30s: " $metric cat /tmp/apps | jq -r ".apps.app[] | select(.queue == $queue) .$metric" | paste -s -d+ - | bc done done
Most likely there are more efficient ways to to do this calculation in higher level programming languages, or if you are a jq expert.
Created 10-11-2017 05:18 PM
Thanks @gnovak currently I am getting app level details similarly as mentioned above using REST API. I am interested to see if there is anything at queue level.