org.apache.hadoop.util
Class MemoryCalculatorPlugin
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.util.MemoryCalculatorPlugin
- All Implemented Interfaces:
- Configurable
- Direct Known Subclasses:
- LinuxMemoryCalculatorPlugin
public abstract class MemoryCalculatorPlugin
- extends Configured
Plugin to calculate virtual and physical memories on the system.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryCalculatorPlugin
public MemoryCalculatorPlugin()
getVirtualMemorySize
public abstract long getVirtualMemorySize()
- Obtain the total size of the virtual memory present in the system.
- Returns:
- virtual memory size in bytes.
getPhysicalMemorySize
public abstract long getPhysicalMemorySize()
- Obtain the total size of the physical memory present in the system.
- Returns:
- physical memory size bytes.
getMemoryCalculatorPlugin
public static MemoryCalculatorPlugin getMemoryCalculatorPlugin(Class<? extends MemoryCalculatorPlugin> clazz,
Configuration conf)
- Get the MemoryCalculatorPlugin from the class name and configure it. If
class name is null, this method will try and return a memory calculator
plugin available for this system.
- Parameters:
clazz
- class-nameconf
- configure the plugin with this.
- Returns:
- MemoryCalculatorPlugin
Copyright © 2009 The Apache Software Foundation