Member since
11-14-2017
1
Post
0
Kudos Received
0
Solutions
04-18-2018
07:17 AM
@Purna Chandra Mahesh Bhogavalli There is no sort or order_by query parameter supported in the ResourceManager rest api. For your curl request, you can check the documentation at http://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html#Cluster_Applications_API The only option now is to sort at the client side. For command line, one easy way is to install a tool called jq https://stedolan.github.io/jq/download/ if you are interested. For your use case, you can do something like follows: curl -get "http://resource-manager-hostname:8088/ws/v1/cluster/apps?state=running&limit=20" | jq '.apps.app|sort_by(.queueUsagePercentage)' For descending sort you can use, curl -get "http://resource-manager-hostname:8088/ws/v1/cluster/apps?state=running&limit=20" | jq '.apps.app|sort_by(.queueUsagePercentage)|reverse' Hope this helps.
... View more