org.apache.hadoop.hbase
Class HServerLoad

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

public class HServerLoad
extends Object
implements org.apache.hadoop.io.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)
          
 void setNumberOfRegions(int numberOfRegions)
           
 String toString()
          
 void write(DataOutput 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

Specified by:
readFields in interface org.apache.hadoop.io.Writable
Throws:
IOException

write

public void write(DataOutput out)
           throws IOException

Specified by:
write in interface org.apache.hadoop.io.Writable
Throws:
IOException

compareTo

public int compareTo(Object o)

Specified by:
compareTo in interface Comparable


Copyright © 2008 The Apache Software Foundation