@InterfaceAudience.Private public class StorageClusterStatusModel extends java.lang.Object implements java.io.Serializable, ProtobufMessageHandler
<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>
<attribute name="readRequestsCount" type="int"></attribute>
<attribute name="writeRequestsCount" type="int"></attribute>
<attribute name="rootIndexSizeKB" type="int"></attribute>
<attribute name="totalStaticIndexSizeKB" type="int"></attribute>
<attribute name="totalStaticBloomSizeKB" type="int"></attribute>
<attribute name="totalCompactingKVs" type="int"></attribute>
<attribute name="currentCompactedKVs" type="int"></attribute>
</complexType>
| Modifier and Type | Class and Description |
|---|---|
static class |
StorageClusterStatusModel.Node
Represents a region server.
|
| Constructor and Description |
|---|
StorageClusterStatusModel()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDeadNode(java.lang.String node)
Add a dead node to the cluster representation.
|
StorageClusterStatusModel.Node |
addLiveNode(java.lang.String name,
long startCode,
int heapSizeMB,
int maxHeapSizeMB)
Add a live node to the cluster representation.
|
byte[] |
createProtobufOutput() |
double |
getAverageLoad() |
java.lang.String |
getDeadNode(int index) |
java.util.List<java.lang.String> |
getDeadNodes() |
StorageClusterStatusModel.Node |
getLiveNode(int index) |
java.util.List<StorageClusterStatusModel.Node> |
getLiveNodes() |
ProtobufMessageHandler |
getObjectFromMessage(byte[] message)
Initialize the model from a protobuf representation.
|
int |
getRegions() |
long |
getRequests() |
void |
setAverageLoad(double averageLoad) |
void |
setDeadNodes(java.util.List<java.lang.String> nodes) |
void |
setLiveNodes(java.util.List<StorageClusterStatusModel.Node> nodes) |
void |
setRegions(int regions) |
void |
setRequests(int requests) |
java.lang.String |
toString() |
public StorageClusterStatusModel.Node addLiveNode(java.lang.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 indexpublic void addDeadNode(java.lang.String node)
node - the dead region server's namepublic java.lang.String getDeadNode(int index)
index - the indexpublic java.util.List<StorageClusterStatusModel.Node> getLiveNodes()
public java.util.List<java.lang.String> getDeadNodes()
public int getRegions()
public long getRequests()
public double getAverageLoad()
public void setLiveNodes(java.util.List<StorageClusterStatusModel.Node> nodes)
nodes - the list of live node modelspublic void setDeadNodes(java.util.List<java.lang.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 java.lang.String toString()
toString in class java.lang.Objectpublic byte[] createProtobufOutput()
createProtobufOutput in interface ProtobufMessageHandlerpublic ProtobufMessageHandler getObjectFromMessage(byte[] message) throws java.io.IOException
ProtobufMessageHandlergetObjectFromMessage in interface ProtobufMessageHandlermessage - the raw bytes of the protobuf messagejava.io.IOException