org.apache.hama.bsp
Class ClusterStatus

java.lang.Object
  extended by org.apache.hama.bsp.ClusterStatus
All Implemented Interfaces:
org.apache.hadoop.io.Writable

public class ClusterStatus
extends Object
implements org.apache.hadoop.io.Writable

Status information on the current state of the BSP cluster.

ClusterStatus provides clients with information such as:

  1. Size of the cluster.
  2. Name of the grooms.
  3. Task capacity of the cluster.
  4. The number of currently running bsp tasks.
  5. State of the BSPMaster.

Clients can query for the latest ClusterStatus, via BSPJobClient.getClusterStatus(boolean).

See Also:
BSPMaster

Constructor Summary
ClusterStatus()
           
ClusterStatus(int grooms, int tasks, int maxTasks, BSPMaster.State state)
           
ClusterStatus(Map<String,String> activeGrooms, int tasks, int maxTasks, BSPMaster.State state)
           
 
Method Summary
 Map<String,String> getActiveGroomNames()
          Get the names of groom servers, and their peers, in the cluster.
 BSPMaster.State getBSPMasterState()
          Get the current state of the BSPMaster, as BSPMaster.State
 int getGroomServers()
          Get the number of groom servers in the cluster.
 int getMaxTasks()
          Get the maximum capacity for running tasks in the cluster.
 int getTasks()
          Get the number of currently running tasks in the cluster.
 void readFields(DataInput in)
           
 void write(DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterStatus

public ClusterStatus()

ClusterStatus

public ClusterStatus(int grooms,
                     int tasks,
                     int maxTasks,
                     BSPMaster.State state)

ClusterStatus

public ClusterStatus(Map<String,String> activeGrooms,
                     int tasks,
                     int maxTasks,
                     BSPMaster.State state)
Method Detail

getGroomServers

public int getGroomServers()
Get the number of groom servers in the cluster.

Returns:
the number of groom servers in the cluster.

getActiveGroomNames

public Map<String,String> getActiveGroomNames()
Get the names of groom servers, and their peers, in the cluster.

Returns:
the active groom servers in the cluster.

getTasks

public int getTasks()
Get the number of currently running tasks in the cluster.

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

getMaxTasks

public int getMaxTasks()
Get the maximum capacity for running tasks in the cluster.

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

getBSPMasterState

public BSPMaster.State getBSPMasterState()
Get the current state of the BSPMaster, as BSPMaster.State

Returns:
the current state of the BSPMaster.

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException


Copyright © 2011 The Apache Software Foundation