Support Questions

Find answers, ask questions, and share your expertise

query YARN application via REST

avatar

Customer is using following REST call to obtain a list of app ids:

http://<rm http address:port>/ws/v1/cluster/apps

Their question is how frequently should they make REST API call so that they do not miss any jobs submitted? -- Are there any recommendations on this?

Thanks

1 ACCEPTED SOLUTION

avatar
Rising Star

This will depend on how fast they wish to have this information...You can get historical info, so you could do this once a day, or once an hour, or once every 5 minutes depending on your use for it.

Its possible to pass parameters to the REST call your making that specific a time range, so you could for example get all the logs from the last hour. So you could do something like...

 http://RMHOST:8088/ws/v1/cluster/apps?startedTimeBegin=1445351681496&startedTimeEnd=1445878421

https://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html#Cluster_...

View solution in original post

1 REPLY 1

avatar
Rising Star

This will depend on how fast they wish to have this information...You can get historical info, so you could do this once a day, or once an hour, or once every 5 minutes depending on your use for it.

Its possible to pass parameters to the REST call your making that specific a time range, so you could for example get all the logs from the last hour. So you could do something like...

 http://RMHOST:8088/ws/v1/cluster/apps?startedTimeBegin=1445351681496&startedTimeEnd=1445878421

https://hadoop.apache.org/docs/stable/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html#Cluster_...