ClusterStatus (Hadoop 0.20.1+169.127 API)
Date: 2011-01-16

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.mapred
Class ClusterStatus

    java.lang.Object
      org.apache.hadoop.mapred.ClusterStatus

All Implemented Interfaces:
  Writable

    public class ClusterStatus

extends Object
implements Writable

Status information on the current state of the Map-Reduce cluster.

`ClusterStatus` provides clients with information such as:

1. Size of the cluster.
2. Name of the trackers.
3. Task capacity of the cluster.
4. The number of currently running map & reduce tasks.
5. State of the `JobTracker`.

Clients can query for the latest `ClusterStatus`, via `JobClient.getClusterStatus()`.

See Also:
  `JobClient`

Method Summary
`Collection<String>` | `getActiveTrackerNames()` Get the names of task trackers in the cluster.
`Collection<String>` | `getBlacklistedTrackerNames()` Get the names of task trackers in the cluster.
`int` | `getBlacklistedTrackers()` Get the number of blacklisted task trackers in the cluster.
`JobTracker.State` | `getJobTrackerState()` Get the current state of the `JobTracker`, as `JobTracker.State`
`int` | `getMapTasks()` Get the number of currently running map tasks in the cluster.
`int` | `getMaxMapTasks()` Get the maximum capacity for running map tasks in the cluster.
`long` | `getMaxMemory()` Get the maximum configured heap memory that can be used by the `JobTracker`
`int` | `getMaxReduceTasks()` Get the maximum capacity for running reduce tasks in the cluster.
`int` | `getReduceTasks()` Get the number of currently running reduce tasks in the cluster.
`int` | `getTaskTrackers()` Get the number of task trackers in the cluster.
`long` | `getTTExpiryInterval()` Get the tasktracker expiry interval for the cluster
`long` | `getUsedMemory()` Get the total heap memory used by the `JobTracker`
`void` | `readFields(DataInput in)` Deserialize the fields of this object from `in`.
`void` | `write(DataOutput out)` Serialize the fields of this object to `out`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getTaskTrackers

    public int getTaskTrackers()

  Get the number of task trackers in the cluster.

  Returns:
    the number of task trackers in the cluster.

### getActiveTrackerNames

    public Collection<String> getActiveTrackerNames()

  Get the names of task trackers in the cluster.

  Returns:
    the active task trackers in the cluster.

### getBlacklistedTrackerNames

    public Collection<String> getBlacklistedTrackerNames()

  Get the names of task trackers in the cluster.

  Returns:
    the blacklisted task trackers in the cluster.

### getBlacklistedTrackers

    public int getBlacklistedTrackers()

  Get the number of blacklisted task trackers in the cluster.

  Returns:
    the number of blacklisted task trackers in the cluster.

### getTTExpiryInterval

    public long getTTExpiryInterval()

  Get the tasktracker expiry interval for the cluster

  Returns:
    the expiry interval in msec

### getMapTasks

    public int getMapTasks()

  Get the number of currently running map tasks in the cluster.

  Returns:
    the number of currently running map tasks in the cluster.

### getReduceTasks

    public int getReduceTasks()

  Get the number of currently running reduce tasks in the cluster.

  Returns:
    the number of currently running reduce tasks in the cluster.

### getMaxMapTasks

    public int getMaxMapTasks()

  Get the maximum capacity for running map tasks in the cluster.

  Returns:
    the maximum capacity for running map tasks in the cluster.

### getMaxReduceTasks

    public int getMaxReduceTasks()

  Get the maximum capacity for running reduce tasks in the cluster.

  Returns:
    the maximum capacity for running reduce tasks in the cluster.

### getJobTrackerState

    public JobTracker.State getJobTrackerState()

  Get the current state of the `JobTracker`, as `JobTracker.State`

  Returns:
    the current state of the `JobTracker`.

### getUsedMemory

    public long getUsedMemory()

  Get the total heap memory used by the `JobTracker`

  Returns:
    the size of heap memory used by the `JobTracker`

### getMaxMemory

    public long getMaxMemory()

  Get the maximum configured heap memory that can be used by the `JobTracker`

  Returns:
    the configured size of max heap memory that can be used by the `JobTracker`

### write

    public void write(DataOutput out)
               throws IOException

  Description copied from interface: `Writable`
  Serialize the fields of this object to `out`.

  Specified by:
    `write` in interface `Writable`
  Parameters:
    `out` - `DataOuput` to serialize this object into.
  Throws:
    `IOException`

### readFields

    public void readFields(DataInput in)
                    throws IOException

  Description copied from interface: `Writable`
  Deserialize the fields of this object from `in`.

  For efficiency, implementations should attempt to re-use storage in the existing object where possible.

  Specified by:
    `readFields` in interface `Writable`
  Parameters:
    `in` - `DataInput` to deseriablize this object from.
  Throws:
    `IOException`

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