@InterfaceAudience.Private @InterfaceStability.Unstable public class NodeManagerHardwareUtils extends Object
Constructor and Description |
---|
NodeManagerHardwareUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
getContainerMemoryMB(org.apache.hadoop.conf.Configuration conf)
Function to return how much memory we should set aside for YARN containers.
|
static int |
getContainerMemoryMB(org.apache.hadoop.yarn.util.ResourceCalculatorPlugin plugin,
org.apache.hadoop.conf.Configuration conf)
Function to return how much memory we should set aside for YARN containers.
|
static float |
getContainersCPUs(org.apache.hadoop.conf.Configuration conf)
Returns the fraction of CPUs that should be used for YARN containers.
|
static float |
getContainersCPUs(org.apache.hadoop.yarn.util.ResourceCalculatorPlugin plugin,
org.apache.hadoop.conf.Configuration conf)
Returns the fraction of CPUs 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.
|
static int |
getNodeCPUs(org.apache.hadoop.conf.Configuration conf)
Returns the number of CPUs on the node.
|
static int |
getNodeCPUs(org.apache.hadoop.yarn.util.ResourceCalculatorPlugin plugin,
org.apache.hadoop.conf.Configuration conf)
Returns the number of CPUs on the node.
|
static int |
getVCores(org.apache.hadoop.conf.Configuration conf)
Function to return the number of vcores on the system that can be used for
YARN containers.
|
static int |
getVCores(org.apache.hadoop.yarn.util.ResourceCalculatorPlugin plugin,
org.apache.hadoop.conf.Configuration conf)
Function to return the number of vcores on the system that can be used for
YARN containers.
|
public static int getNodeCPUs(org.apache.hadoop.conf.Configuration conf)
conf
- - Configuration objectpublic static int getNodeCPUs(org.apache.hadoop.yarn.util.ResourceCalculatorPlugin plugin, org.apache.hadoop.conf.Configuration conf)
plugin
- - ResourceCalculatorPlugin object to determine hardware specsconf
- - Configuration objectpublic static float getContainersCPUs(org.apache.hadoop.conf.Configuration conf)
conf
- - Configuration objectpublic static float getContainersCPUs(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_LIMIT
conf
- Configuration objectpublic static int getVCores(org.apache.hadoop.conf.Configuration conf)
conf
- - the configuration for the NodeManagerpublic static int getVCores(org.apache.hadoop.yarn.util.ResourceCalculatorPlugin plugin, org.apache.hadoop.conf.Configuration conf)
plugin
- - ResourceCalculatorPlugin object to determine hardware specsconf
- - the configuration for the NodeManagerpublic static int getContainerMemoryMB(org.apache.hadoop.conf.Configuration conf)
conf
- - the configuration for the NodeManagerpublic static int getContainerMemoryMB(org.apache.hadoop.yarn.util.ResourceCalculatorPlugin plugin, org.apache.hadoop.conf.Configuration conf)
plugin
- - ResourceCalculatorPlugin object to determine hardware specsconf
- - the configuration for the NodeManagerCopyright © 2018 Apache Software Foundation. All Rights Reserved.