Class StorageClusterStatusModel
java.lang.Object
org.apache.hadoop.hbase.rest.model.StorageClusterStatusModel
- All Implemented Interfaces:
Serializable,ProtobufMessageHandler
@Private
public class StorageClusterStatusModel
extends Object
implements Serializable, ProtobufMessageHandler
Representation of the status of a storage cluster:
- regions: the total number of regions served by the cluster
- requests: the total number of requests per second handled by the cluster in the last reporting interval
- averageLoad: the average load of the region servers in the cluster
- liveNodes: detailed status of the live region servers
- deadNodes: the names of region servers declared dead
<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="cpRequestsCount" 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>
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a region server. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleprivate List<StorageClusterStatusModel.Node>private intprivate longprivate static final longFields inherited from interface org.apache.hadoop.hbase.rest.ProtobufMessageHandler
BUFFER_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDeadNode(String node) Add a dead node to the cluster representation.addLiveNode(String name, long startCode, int heapSizeMB, int maxHeapSizeMB) Add a live node to the cluster representation.doubleReturns the average load of the region servers in the clustergetDeadNode(int index) Returns the list of dead nodesgetLiveNode(int index) Returns the list of live nodesgetObjectFromMessage(org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream cis) intReturns the total number of regions served by the clusterlongorg.apache.hbase.thirdparty.com.google.protobuf.MessageConvert to model to a protobuf Message objectvoidsetAverageLoad(double averageLoad) voidsetDeadNodes(List<String> nodes) voidvoidsetRegions(int regions) voidsetRequests(long requests) toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.rest.ProtobufMessageHandler
createProtobufOutput, getObjectFromMessage, getObjectFromMessage, writeProtobufOutput
-
Field Details
-
serialVersionUID
- See Also:
-
liveNodes
-
deadNodes
-
regions
-
requests
-
averageLoad
-
-
Constructor Details
-
StorageClusterStatusModel
public StorageClusterStatusModel()Default constructor
-
-
Method Details
-
addLiveNode
public StorageClusterStatusModel.Node addLiveNode(String name, long startCode, int heapSizeMB, int maxHeapSizeMB) Add a live node to the cluster representation.- Parameters:
name- the region server namestartCode- the region server's start codeheapSizeMB- the current heap size, in MBmaxHeapSizeMB- the maximum heap size, in MB
-
getLiveNode
- Parameters:
index- the index- Returns:
- the region server model
-
addDeadNode
Add a dead node to the cluster representation.- Parameters:
node- the dead region server's name
-
getDeadNode
- Parameters:
index- the index- Returns:
- the dead region server's name
-
getLiveNodes
Returns the list of live nodes -
getDeadNodes
Returns the list of dead nodes -
getRegions
Returns the total number of regions served by the cluster -
getRequests
- Returns:
- the total number of requests per second handled by the cluster in the last reporting interval
-
getAverageLoad
Returns the average load of the region servers in the cluster -
setLiveNodes
- Parameters:
nodes- the list of live node models
-
setDeadNodes
- Parameters:
nodes- the list of dead node names
-
setRegions
- Parameters:
regions- the total number of regions served by the cluster
-
setRequests
- Parameters:
requests- the total number of requests per second handled by the cluster
-
setAverageLoad
- Parameters:
averageLoad- the average load of region servers in the cluster
-
toString
-
messageFromObject
Description copied from interface:ProtobufMessageHandlerConvert to model to a protobuf Message object- Specified by:
messageFromObjectin interfaceProtobufMessageHandler- Returns:
- the protobuf Message object
-
getObjectFromMessage
public ProtobufMessageHandler getObjectFromMessage(org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream cis) throws IOException - Specified by:
getObjectFromMessagein interfaceProtobufMessageHandler- Throws:
IOException
-