For vCores following are the configurations:
yarn.scheduler.maximum-allocation-vcores - Specifies maximum allocation of vCores for every container request
Typically in yarn-site.xml, you set this value to 32. I think, any value greater than 32 will be rejected by YARN.
<property>
<name>yarn.scheduler.maximum-allocation-vcores</name>
<value>32</value>
</property>
If this value is not set, then YARN RM takes the default value, which is "4"
public static final int DEFAULT_RM_SCHEDULER_MAXIMUM_ALLOCATION_VCORES = 4;
If you are running a MapReduce application, then you also need to set two more configuration parameters, in mapred-site.xml:
- mapreduce.map.cpu.vcores - The number of vCores to request from the scheduler for map tasks
- mapreduce.reduce.cpu.vcores - The number of vCores to request from the scheduler for the reduce tasks
The resource calculation for your mapper/reducer requests is done in the scheduler code. If you want your scheduler to consider both memory and CPUs for resource calculation, then you need to use "DominantResourceCalculator" (which considers both CPU and memory for resource calculation)
For e.g. if you are using Capacity Scheduler, then you need to specify following parameter in "capacity-scheduler.xml" file:
<property>
<name>yarn.scheduler.capacity.resource-calculator</name>
<value>org.apache.hadoop.yarn.util.resource.DominantResourceCalculator</value>
</property>
Please check this link: http://www.cloudera.com/content/www/en-us/documentation/enterprise/latest/topics/cdh_ig_yarn_tuning.html
This gives a detailed description of various configuration parameters.