org.apache.hadoop.yarn.util
Class WindowsResourceCalculatorPlugin

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.yarn.util.ResourceCalculatorPlugin
          extended by org.apache.hadoop.yarn.util.WindowsResourceCalculatorPlugin
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable

@InterfaceAudience.Private
public class WindowsResourceCalculatorPlugin
extends ResourceCalculatorPlugin


Field Summary
 
Fields inherited from class org.apache.hadoop.yarn.util.ResourceCalculatorPlugin
processPid
 
Constructor Summary
WindowsResourceCalculatorPlugin()
           
 
Method Summary
 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.
 long getCpuFrequency()
          Obtain the CPU frequency of on the system.
 float getCpuUsage()
          Obtain the CPU usage % of the machine.
 long getCumulativeCpuTime()
          Obtain the cumulative CPU time since the system is on.
 int getNumProcessors()
          Obtain the total number of processors present on the system.
 long getPhysicalMemorySize()
          Obtain the total size of the physical memory present in the system.
 long getVirtualMemorySize()
          Obtain the total size of the virtual memory present in the system.
 
Methods inherited from class org.apache.hadoop.yarn.util.ResourceCalculatorPlugin
getResourceCalculatorPlugin, setProcessPid
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowsResourceCalculatorPlugin

public WindowsResourceCalculatorPlugin()
Method Detail

getVirtualMemorySize

public long getVirtualMemorySize()
Obtain the total size of the virtual memory present in the system.

Specified by:
getVirtualMemorySize in class ResourceCalculatorPlugin
Returns:
virtual memory size in bytes.

getPhysicalMemorySize

public long getPhysicalMemorySize()
Obtain the total size of the physical memory present in the system.

Specified by:
getPhysicalMemorySize in class ResourceCalculatorPlugin
Returns:
physical memory size bytes.

getAvailableVirtualMemorySize

public long getAvailableVirtualMemorySize()
Obtain the total size of the available virtual memory present in the system.

Specified by:
getAvailableVirtualMemorySize in class ResourceCalculatorPlugin
Returns:
available virtual memory size in bytes.

getAvailablePhysicalMemorySize

public long getAvailablePhysicalMemorySize()
Obtain the total size of the available physical memory present in the system.

Specified by:
getAvailablePhysicalMemorySize in class ResourceCalculatorPlugin
Returns:
available physical memory size bytes.

getNumProcessors

public int getNumProcessors()
Obtain the total number of processors present on the system.

Specified by:
getNumProcessors in class ResourceCalculatorPlugin
Returns:
number of processors

getCpuFrequency

public long getCpuFrequency()
Obtain the CPU frequency of on the system.

Specified by:
getCpuFrequency in class ResourceCalculatorPlugin
Returns:
CPU frequency in kHz

getCumulativeCpuTime

public long getCumulativeCpuTime()
Obtain the cumulative CPU time since the system is on.

Specified by:
getCumulativeCpuTime in class ResourceCalculatorPlugin
Returns:
cumulative CPU time in milliseconds

getCpuUsage

public float getCpuUsage()
Obtain the CPU usage % of the machine. Return -1 if it is unavailable

Specified by:
getCpuUsage in class ResourceCalculatorPlugin
Returns:
CPU usage in %


Copyright © 2014 Apache Software Foundation. All Rights Reserved.