MemoryCalculatorPlugin (Hadoop 0.20.2-CDH3B4 API)
Date: 2011-02-21

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Constructor Summary
`MemoryCalculatorPlugin()`

Method Summary
`static MemoryCalculatorPlugin` | `getMemoryCalculatorPlugin(Class<? extends MemoryCalculatorPlugin> clazz, Configuration conf)` Get the MemoryCalculatorPlugin from the class name and configure it.
`abstract long` | `getPhysicalMemorySize()` Obtain the total size of the physical memory present in the system.
`abstract long` | `getVirtualMemorySize()` Obtain the total size of the virtual memory present in the system.

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

### MemoryCalculatorPlugin

    public MemoryCalculatorPlugin()

Method Detail

### 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-name
    `conf` - configure the plugin with this.
  Returns:
    MemoryCalculatorPlugin

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation