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]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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_...