I have 10 nodes in hadoop cluster with 32GB RAM and one with 64GB.
For these 10 nodes node limit yarn.nodemanager.resource.memory-mb is set to 26GB and for 64GB node to 52GB (have some jobs that require 50GB for single reducer, they run on this node)
The problem is, when I run basic jobs that require say 8GB for mapper, 32GB nodes spawn 3 mappers in parallel (26 / 8 = 3) and 64GB node spawns 6 mappers. This node usually finishes last, because of CPU load.
I'd like to limit job container resources programmatically, e.g. set container limit to 26GB for most of the jobs. How can it be done?