|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.rest.model.StorageClusterStatusModel
public class StorageClusterStatusModel
Representation of the status of a storage cluster:
<complexType name="StorageClusterStatus"> <sequence> <element name="liveNode" type="tns:Node" maxOccurs="unbounded" minOccurs="0"> </element> <element name="deadNode" type="string" maxOccurs="unbounded" minOccurs="0"> </element> </sequence> <attribute name="regions" type="int"></attribute> <attribute name="requests" type="int"></attribute> <attribute name="averageLoad" type="float"></attribute> </complexType> <complexType name="Node"> <sequence> <element name="region" type="tns:Region" maxOccurs="unbounded" minOccurs="0"></element> </sequence> <attribute name="name" type="string"></attribute> <attribute name="startCode" type="int"></attribute> <attribute name="requests" type="int"></attribute> <attribute name="heapSizeMB" type="int"></attribute> <attribute name="maxHeapSizeMB" type="int"></attribute> </complexType> <complexType name="Region"> <attribute name="name" type="base64Binary"></attribute> <attribute name="stores" type="int"></attribute> <attribute name="storefiles" type="int"></attribute> <attribute name="storefileSizeMB" type="int"></attribute> <attribute name="memstoreSizeMB" type="int"></attribute> <attribute name="storefileIndexSizeMB" type="int"></attribute> </complexType>
Nested Class Summary | |
---|---|
static class |
StorageClusterStatusModel.Node
Represents a region server. |
Constructor Summary | |
---|---|
StorageClusterStatusModel()
Default constructor |
Method Summary | |
---|---|
void |
addDeadNode(String node)
Add a dead node to the cluster representation. |
StorageClusterStatusModel.Node |
addLiveNode(String name,
long startCode,
int heapSizeMB,
int maxHeapSizeMB)
Add a live node to the cluster representation. |
byte[] |
createProtobufOutput()
|
double |
getAverageLoad()
|
String |
getDeadNode(int index)
|
List<String> |
getDeadNodes()
|
StorageClusterStatusModel.Node |
getLiveNode(int index)
|
List<StorageClusterStatusModel.Node> |
getLiveNodes()
|
ProtobufMessageHandler |
getObjectFromMessage(byte[] message)
Initialize the model from a protobuf representation. |
int |
getRegions()
|
int |
getRequests()
|
void |
setAverageLoad(double averageLoad)
|
void |
setDeadNodes(List<String> nodes)
|
void |
setLiveNodes(List<StorageClusterStatusModel.Node> nodes)
|
void |
setRegions(int regions)
|
void |
setRequests(int requests)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StorageClusterStatusModel()
Method Detail |
---|
public StorageClusterStatusModel.Node addLiveNode(String name, long startCode, int heapSizeMB, int maxHeapSizeMB)
name
- the region server namestartCode
- the region server's start codeheapSizeMB
- the current heap size, in MBmaxHeapSizeMB
- the maximum heap size, in MBpublic StorageClusterStatusModel.Node getLiveNode(int index)
index
- the index
public void addDeadNode(String node)
node
- the dead region server's namepublic String getDeadNode(int index)
index
- the index
public List<StorageClusterStatusModel.Node> getLiveNodes()
public List<String> getDeadNodes()
public int getRegions()
public int getRequests()
public double getAverageLoad()
public void setLiveNodes(List<StorageClusterStatusModel.Node> nodes)
nodes
- the list of live node modelspublic void setDeadNodes(List<String> nodes)
nodes
- the list of dead node namespublic void setRegions(int regions)
regions
- the total number of regions served by the clusterpublic void setRequests(int requests)
requests
- the total number of requests per second handled by the
clusterpublic void setAverageLoad(double averageLoad)
averageLoad
- the average load of region servers in the clusterpublic String toString()
toString
in class Object
public byte[] createProtobufOutput()
createProtobufOutput
in interface ProtobufMessageHandler
public ProtobufMessageHandler getObjectFromMessage(byte[] message) throws IOException
ProtobufMessageHandler
getObjectFromMessage
in interface ProtobufMessageHandler
message
- the raw bytes of the protobuf message
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |