@InterfaceAudience.LimitedPrivate(value={"YARN","MAPREDUCE"})
@InterfaceStability.Unstable
public class ResourceCalculatorPlugin
extends org.apache.hadoop.conf.Configured
Modifier | Constructor and Description |
---|---|
protected |
ResourceCalculatorPlugin() |
|
ResourceCalculatorPlugin(org.apache.hadoop.util.SysInfo sys) |
Modifier and Type | Method and Description |
---|---|
long |
getAvailablePhysicalMemorySize()
Obtain the total size of the available physical memory present
in the system.
|
long |
getAvailableVirtualMemorySize()
Obtain the total size of the available virtual memory present
in the system.
|
static ResourceCalculatorPlugin |
getContainersMonitorPlugin(org.apache.hadoop.conf.Configuration conf)
Create the ResourceCalculatorPlugin for the containers monitor in the Node
Manager and configure it.
|
long |
getCpuFrequency()
Obtain the CPU frequency of on the system.
|
float |
getCpuUsagePercentage()
Obtain the CPU usage % of the machine.
|
long |
getCumulativeCpuTime()
Obtain the cumulative CPU time since the system is on.
|
long |
getNetworkBytesRead()
Obtain the aggregated number of bytes read over the network.
|
long |
getNetworkBytesWritten()
Obtain the aggregated number of bytes written to the network.
|
static ResourceCalculatorPlugin |
getNodeResourceMonitorPlugin(org.apache.hadoop.conf.Configuration conf)
Create the ResourceCalculatorPlugin for the node resource monitor in the
Node Manager and configure it.
|
int |
getNumCores()
Obtain total number of physical cores present on the system.
|
int |
getNumProcessors()
Obtain the total number of logical processors present on the system.
|
float |
getNumVCoresUsed()
Obtain the number of VCores used.
|
long |
getPhysicalMemorySize()
Obtain the total size of the physical memory present in the system.
|
static ResourceCalculatorPlugin |
getResourceCalculatorPlugin(Class<? extends ResourceCalculatorPlugin> clazz,
org.apache.hadoop.conf.Configuration conf)
Create the ResourceCalculatorPlugin from the class name and configure it.
|
long |
getStorageBytesRead()
Obtain the aggregated number of bytes read from disks.
|
long |
getStorageBytesWritten()
Obtain the aggregated number of bytes written to disks.
|
long |
getVirtualMemorySize()
Obtain the total size of the virtual memory present in the system.
|
protected ResourceCalculatorPlugin()
public ResourceCalculatorPlugin(org.apache.hadoop.util.SysInfo sys)
public long getVirtualMemorySize()
public long getPhysicalMemorySize()
public long getAvailableVirtualMemorySize()
public long getAvailablePhysicalMemorySize()
public int getNumProcessors()
public int getNumCores()
public long getCpuFrequency()
public long getCumulativeCpuTime()
public float getCpuUsagePercentage()
public float getNumVCoresUsed()
public long getNetworkBytesRead()
public long getNetworkBytesWritten()
public long getStorageBytesRead()
public long getStorageBytesWritten()
public static ResourceCalculatorPlugin getResourceCalculatorPlugin(Class<? extends ResourceCalculatorPlugin> clazz, org.apache.hadoop.conf.Configuration conf)
clazz
- ResourceCalculator plugin class-nameconf
- configure the plugin with this.public static ResourceCalculatorPlugin getContainersMonitorPlugin(org.apache.hadoop.conf.Configuration conf)
conf
- Configure the plugin with this.public static ResourceCalculatorPlugin getNodeResourceMonitorPlugin(org.apache.hadoop.conf.Configuration conf)
conf
- Configure the plugin with this.Copyright © 2008–2019 Apache Software Foundation. All rights reserved.