First of all, yarn.nodemanager.resource.memory-mb(Memory), yarn.nodemanager.resource.cpu-vcores(vcore) are the configuration properties of the Nodemanager daemon / service and cannot be overridden in YARN client applications. You need to restart the nodemanager services if you change these configuration properties.
CPU , YARN Fairscheduler DRF (Dominant Resource Fairness) , , . (mapper/reducer/AM/tasks) vcores,
/ .
schedulingPolicy: . : "fifo" / "fair" / "drf"
. apache -
, / DRF, .
conf = new Configuration();
mapreduce.
Configuration conf = new Configuration();
conf.set("mapreduce.map.memory.mb","4096");
conf.set(mapreduce.reduce.memory.mb","4096");
conf.set(mapreduce.map.cpu.vcores","1");
conf.set(mapreduce.reduce.cpu.vcores","1");
- https://hadoop.apache.org/docs/r2.7.2/hadoop-mapreduce-client/hadoop-mapreduce-client-core/mapred-default.xml
cpu.vcores mapper/reducer 1, , .
, , / .