@InterfaceAudience.Private @InterfaceStability.Unstable public class NodeManagerHardwareUtils extends Object
| Constructor and Description |
|---|
NodeManagerHardwareUtils() |
| Modifier and Type | Method and Description |
|---|---|
static float |
getContainersCores(org.apache.hadoop.conf.Configuration conf)
Returns the fraction of CPU cores that should be used for YARN containers.
|
static float |
getContainersCores(org.apache.hadoop.yarn.util.ResourceCalculatorPlugin plugin,
org.apache.hadoop.conf.Configuration conf)
Returns the fraction of CPU cores that should be used for YARN containers.
|
static int |
getNodeCpuPercentage(org.apache.hadoop.conf.Configuration conf)
Gets the percentage of physical CPU that is configured for YARN containers.
|
public static float getContainersCores(org.apache.hadoop.conf.Configuration conf)
conf - - Configuration objectpublic static float getContainersCores(org.apache.hadoop.yarn.util.ResourceCalculatorPlugin plugin,
org.apache.hadoop.conf.Configuration conf)
plugin - - ResourceCalculatorPlugin object to determine hardware specsconf - - Configuration objectpublic static int getNodeCpuPercentage(org.apache.hadoop.conf.Configuration conf)
YarnConfiguration.NM_RESOURCE_PERCENTAGE_PHYSICAL_CPU_LIMITconf - Configuration objectCopyright © 2016 Apache Software Foundation. All Rights Reserved.