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
Modifier and TypeClassDescriptionstatic class
Represents a region server. -
Field Summary
Modifier and TypeFieldDescriptionprivate double
private List<StorageClusterStatusModel.Node>
private int
private long
private static final long
Fields inherited from interface org.apache.hadoop.hbase.rest.ProtobufMessageHandler
BUFFER_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDeadNode
(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.double
Returns 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) int
Returns the total number of regions served by the clusterlong
org.apache.hbase.thirdparty.com.google.protobuf.Message
Convert to model to a protobuf Message objectvoid
setAverageLoad
(double averageLoad) void
setDeadNodes
(List<String> nodes) void
void
setRegions
(int regions) void
setRequests
(long requests) toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:ProtobufMessageHandler
Convert to model to a protobuf Message object- Specified by:
messageFromObject
in interfaceProtobufMessageHandler
- Returns:
- the protobuf Message object
-
getObjectFromMessage
public ProtobufMessageHandler getObjectFromMessage(org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream cis) throws IOException - Specified by:
getObjectFromMessage
in interfaceProtobufMessageHandler
- Throws:
IOException
-