org.apache.hama.bsp
Class GroomServerStatus

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

public class GroomServerStatus
extends java.lang.Object
implements org.apache.hadoop.io.Writable

A GroomServerStatus is a BSP primitive. Keeps info on a BSPMaster. The BSPMaster maintains a set of the most recent GroomServerStatus objects for each unique GroomServer it knows about.


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
GroomServerStatus()
           
GroomServerStatus(java.lang.String groomName, java.lang.String peerName, java.util.List<org.apache.hama.bsp.TaskStatus> taskReports, int failures, int maxTasks)
           
GroomServerStatus(java.lang.String groomName, java.lang.String peerName, java.util.List<org.apache.hama.bsp.TaskStatus> taskReports, int failures, int maxTasks, java.lang.String rpc)
           
 
Method Summary
 int countTasks()
          Return the current MapTask count
 boolean equals(java.lang.Object o)
           
 int getFailures()
           
 java.lang.String getGroomName()
           
 long getLastSeen()
           
 int getMaxTasks()
           
 java.lang.String getPeerName()
          The host (and port) from where the groom server can be reached.
 java.lang.String getRpcServer()
           
 java.util.List<org.apache.hama.bsp.TaskStatus> getTaskReports()
          Get the current tasks at the GroomServer.
 int hashCode()
          For BSPMaster to distinguish between different GroomServers, because BSPMaster stores using GroomServerStatus as key.
 void readFields(java.io.DataInput in)
           
 void setLastSeen(long lastSeen)
           
 java.util.Iterator<org.apache.hama.bsp.TaskStatus> taskReports()
           
 void write(java.io.DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

GroomServerStatus

public GroomServerStatus()

GroomServerStatus

public GroomServerStatus(java.lang.String groomName,
                         java.lang.String peerName,
                         java.util.List<org.apache.hama.bsp.TaskStatus> taskReports,
                         int failures,
                         int maxTasks)

GroomServerStatus

public GroomServerStatus(java.lang.String groomName,
                         java.lang.String peerName,
                         java.util.List<org.apache.hama.bsp.TaskStatus> taskReports,
                         int failures,
                         int maxTasks,
                         java.lang.String rpc)
Method Detail

getGroomName

public java.lang.String getGroomName()

getPeerName

public java.lang.String getPeerName()
The host (and port) from where the groom server can be reached.

Returns:
The groom server address in the form of "hostname:port"

getRpcServer

public java.lang.String getRpcServer()

getTaskReports

public java.util.List<org.apache.hama.bsp.TaskStatus> getTaskReports()
Get the current tasks at the GroomServer. Tasks are tracked by a TaskStatus object.

Returns:
a list of TaskStatus representing the current tasks at the GroomServer.

getFailures

public int getFailures()

getLastSeen

public long getLastSeen()

setLastSeen

public void setLastSeen(long lastSeen)

getMaxTasks

public int getMaxTasks()

countTasks

public int countTasks()
Return the current MapTask count


hashCode

public int hashCode()
For BSPMaster to distinguish between different GroomServers, because BSPMaster stores using GroomServerStatus as key.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

readFields

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

write

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

taskReports

public java.util.Iterator<org.apache.hama.bsp.TaskStatus> taskReports()


Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.