org.apache.hadoop.hbase
Class HServerLoad

java.lang.Object
  extended by org.apache.hadoop.hbase.HServerLoad
All Implemented Interfaces:
Comparable, Writable, WritableComparable

public class HServerLoad
extends Object
implements WritableComparable

This class encapsulates metrics for determining the load on a HRegionServer


Constructor Summary
HServerLoad()
          default constructior (used by Writable)
HServerLoad(int numberOfRequests, int numberOfRegions)
          Constructor
 
Method Summary
 int compareTo(Object o)
          
 boolean equals(Object o)
          
 int getLoad()
           
 int getNumberOfRegions()
           
 int getNumberOfRequests()
           
 int hashCode()
          
 void readFields(DataInput in)
          Deserialize the fields of this object from in.
 void setNumberOfRegions(int numberOfRegions)
           
 String toString()
          
 void write(DataOutput out)
          Serialize the fields of this object to out.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HServerLoad

public HServerLoad()
default constructior (used by Writable)


HServerLoad

public HServerLoad(int numberOfRequests,
                   int numberOfRegions)
Constructor

Parameters:
numberOfRequests -
numberOfRegions -
Method Detail

getLoad

public int getLoad()
Returns:
load factor for this server

toString

public String toString()

Overrides:
toString in class Object

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

getNumberOfRegions

public int getNumberOfRegions()
Returns:
the numberOfRegions

getNumberOfRequests

public int getNumberOfRequests()
Returns:
the numberOfRequests

setNumberOfRegions

public void setNumberOfRegions(int numberOfRegions)
Parameters:
numberOfRegions - the numberOfRegions to set

readFields

public void readFields(DataInput in)
                throws IOException
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

write

public void write(DataOutput out)
           throws IOException
Serialize the fields of this object to out.

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

compareTo

public int compareTo(Object o)

Specified by:
compareTo in interface Comparable


Copyright © 2006 The Apache Software Foundation