How do i get the total count i.e max capacity of containers from Resource Manager of YARN in Hadoop Cluster. I did try REST Api's and JMX metrics am getting only total allocated containers and pending containers.So is there any way i can retrieve the max containers that can be created count?
Asked
Active
Viewed 743 times
2 Answers
0
In YARN, we have minimum allocation property, so all container have minimuum of that value. So based on that you can caluculate maximum number of containers that can be launched (divide by total memory available for yarn). I think this is the only way to get maximum containers that can be launched.
So in your programs, get these two properties and doing some math will get you required result.
Properties to look for are :
<name>yarn.scheduler.minimum-allocation-mb</name>
<value>1024</value>
<name>yarn.scheduler.minimum-allocation-mb</name>
<value>8192</value>

Karthik
- 1,801
- 1
- 13
- 21
-
Sure thanks...I tried invoking YARN RM REST API's for Cluster JMX Metrics. – Sushil Ks Jul 30 '15 at 13:37
0
The RM API cluster metrics shows you total vcores and total memory.
So if you do a GET on RM-URL/ws/v1/cluster/metrics you'd see the values of "totalMB" and "totalVirtualCores".

tk421
- 5,775
- 6
- 23
- 34