Interface RhinoHousekeepingMBean
-
public interface RhinoHousekeepingMBean
Administration MBean for operator driven Rhino housekeeping.
When a node is configured to use the pool clustering mode, operations in this interface that take a node ID argument can only be used to manage state on the node the management client directs this method call at, as determined by
getNodeID()
. To manage state for another node in pool mode, a client must connect directly with that node.
-
-
Field Summary
Fields Modifier and Type Field Description static String
OBJECT_NAME
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
flushConfiguration()
Request that all configuration state waiting for persistence be persisted to the management database as soon as possible.void
flushKeyValueStores()
Request that all application state waiting for persistence in all key/value stores in all event router nodes in the cluster be persisted to the backing database as soon as possible.void
flushKeyValueStores(int[] nodeIDs)
Request that all application state waiting for persistence in all key/value stores in the specified event router nodes be persisted to the backing database as soon as possible.int[]
getAllClusterNodes()
Get the node IDs of all cluster members, including quorum nodes.ObjectName
getClusterHousekeeping()
Get aNodeHousekeepingMBean
for the cluster.TabularData
getClusterState()
Queries current cluster state returning a summary of the state of each cluster member.TabularData
getDomainConfig()
Returns the current domain configuration.int[]
getEventRouterNodes()
Get the node IDs of all event processing nodes in the cluster.TabularData
getKeyValueStoreStatus(int[] nodeIDs)
Get the current operational status of the key/value stores on the specified nodes.ObjectName
getNodeHousekeeping(int nodeID)
Get aNodeHousekeepingMBean
for a single cluster node.int
getNodeID()
Get the node ID of this node.String[]
getPersistenceResources()
Get the names of the persistence resources that have been defined for the node.int[]
getQuorumNodes()
Get the node IDs of all quorum nodes in the cluster.TabularData
getReplicatedMemDBStripingConfig()
Returns the current MemDB striping configuration for replicated MemDB instances.TabularData
getSessionOwnershipStoreStatus(int[] nodeIDs)
Get the current operational status of the session ownership store on the specified nodes.String
getSnapshotHostAddress()
Returns a textual representation of the IP address of the network interface the node is using for streaming snapshot data.int
getSnapshotPort()
Returns the port the currently connected node uses for streaming snapshot data.CompositeData
getVersion()
Returns Rhino version information as CompositeData.boolean
isReady(int nodeID)
Test whether a node is ready to receive management commands.void
markAllActivitiesForRemoval(String entityName, int[] nodeIDs)
Mark all activities belonging to a resource adaptor entity on the specified nodes for removal.void
removeAllSbbs(ServiceID serviceID, int[] nodeIDs)
Remove all SBB entities from a service on the specified nodes.
-
-
-
Field Detail
-
OBJECT_NAME
static final String OBJECT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNodeID
int getNodeID()
Get the node ID of this node. This method may be used by a management client to determine which Rhino node it is communicating with.
- See Also:
PoolManagementMBean.getNodeID()
-
getEventRouterNodes
int[] getEventRouterNodes()
Get the node IDs of all event processing nodes in the cluster.
This method only returns meaningful results when the node is configured to use savanna clustering. When using the pool clustering mode, this method will return a single element array containing only this node’s node ID. Use
PoolManagementMBean.getPoolNodeIDs()
to get an array of all event router nodes when using pool mode.- Returns:
- an array of the node IDs of all event processing nodes in the cluster.
- See Also:
PoolManagementMBean.getPoolNodeIDs()
-
getQuorumNodes
int[] getQuorumNodes()
Get the node IDs of all quorum nodes in the cluster.
This method only returns meaningful results when the node is configured to use savanna clustering. The pool clustering mode does not use quorum nodes, so this method will always return an empty array when this mode is configured.
- Returns:
- an array of thee node IDs of all quorum nodes in the cluster.
-
getAllClusterNodes
int[] getAllClusterNodes()
Get the node IDs of all cluster members, including quorum nodes.
This method only returns meaningful results when the node is configured to use savanna clustering. When using the pool clustering mode, this method will return a single element array containing only this node’s node ID. Use
PoolManagementMBean.getPoolNodeIDs()
to get an array of all cluster nodes when using pool mode.- Returns:
- an array of the node IDs of all nodes in the cluster.
- See Also:
PoolManagementMBean.getPoolNodeIDs()
-
getClusterHousekeeping
ObjectName getClusterHousekeeping() throws ManagementException
Get a
NodeHousekeepingMBean
for the cluster.This method returns a special instance of
NodeHousekeepingMBean
that operates on the entire cluster rather than a single node.Note that when using the pool clustering mode, the MBean returned from this method will only operate on the local node, not the entire cluster of pool nodes, i.e. the MBean will have the same behaviour as the MBean obtained using
getNodeHousekeeping(getNodeID())
.- Returns:
- the JMX ObjectName of a NodeHousekeepingMBean.
- Throws:
ManagementException
- if an internal error occurs.
-
getNodeHousekeeping
ObjectName getNodeHousekeeping(int nodeID) throws InvalidArgumentException, ManagementException
Get a
NodeHousekeepingMBean
for a single cluster node.This method returns the Object Name of a
NodeHousekeepingMBean
that operates on a single node. When using the savanna clustering mode, the specified node does not have to be a current member of the cluster, it may represent a failed or yet to join node. Invocations made against the returned MBean will fail however if the specified node is not a member of the cluster when the invocation occurs.When using the pool clustering mode, it is only possible to get a
NodeHousekeepingMBean
for this node. Attempting to get aNodeHousekeepingMBean
for any other node will result in anInvalidArgumentException
being thrown.- Parameters:
nodeID
- node ID of the node.- Returns:
- the JMX ObjectName of a NodeHousekeepingMBean.
- Throws:
InvalidArgumentException
- ifnodeID
is invalid, or if using the pool clustering mode andnodeID != getNodeID()
.ManagementException
- if an internal error occurs.
-
markAllActivitiesForRemoval
void markAllActivitiesForRemoval(String entityName, int[] nodeIDs) throws NullPointerException, UnrecognizedResourceAdaptorEntityException, InvalidStateException, ManagementException
Mark all activities belonging to a resource adaptor entity on the specified nodes for removal.
Caution: This method irrevocably removes application state.
Used for force-ending activities from a deactivating resource adaptor.
All activities belonging to the specified resource adaptor entity on the specified nodes will be marked as requiring removal and then ended during the next iteration of Rhino’s periodic query-liveness scan.
The resource adaptor entity must be in the deactivating state on the given nodes.
When using the pool clustering mode, this method can only be used to mark activities for removal on this node. Any other specified node ID will be ignored.
- Parameters:
entityName
- Resource Adaptor entity name of the RA entitynodeIDs
- the node IDs of the nodes to remove activities from. May be zero-length, in which case all current event-router cluster nodes are targeted.- Throws:
NullPointerException
- if either argument isnull
.UnrecognizedResourceAdaptorEntityException
- if the resource adaptor entity is unknown.InvalidStateException
- if the resource adaptor entity is not in the Stopping or Inactive state, or the SLEE is not in the Stopping or Stopped state, on the specified nodes.ManagementException
- if an internal error occurs.
-
removeAllSbbs
void removeAllSbbs(ServiceID serviceID, int[] nodeIDs) throws NullPointerException, UnrecognizedServiceException, InvalidStateException, ManagementException
Remove all SBB entities from a service on the specified nodes.
Caution: This method irrevocably removes application state.
Used for forcibly removing remaining SBBs from a deactivating service.
When using the pool clustering mode, this method can only be used to remove SBBs on this node. Any other specified node ID will be ignored.
- Parameters:
serviceID
- component ID of the service from which all SBBs should be removed.nodeIDs
- the node IDs of the nodes to remove SBB entities from. May be zero-length, in which case all current event-router cluster nodes are targeted.- Throws:
NullPointerException
- if either argument isnull
.UnrecognizedServiceException
- if the service is unknown.InvalidStateException
- if the service is not in the Stopping or Inactive state, or the SLEE is not in the Stopping or Stopped state, on the specified nodes.ManagementException
- if an internal error occurs.
-
isReady
boolean isReady(int nodeID) throws ManagementException
Test whether a node is ready to receive management commands.
When using the pool clustering mode, this method can only be used to test the state of this node. Specifying any other node ID will always result in a return value of
false
.- Parameters:
nodeID
- node ID of the node.- Throws:
ManagementException
- if an internal error occurs.
-
getPersistenceResources
String[] getPersistenceResources() throws ManagementException
Get the names of the persistence resources that have been defined for the node.
- Returns:
- the persistence resource names.
- Throws:
ManagementException
- if an internal error occurs.- Since:
- Rhino 2.6.1
-
getClusterState
TabularData getClusterState() throws ManagementException
Queries current cluster state returning a summary of the state of each cluster member.
This method only returns meaningful results when the node is configured to use savanna clustering. When using the pool clustering mode, this method will return a single row of
TabularData
containing only this node’s state. UsePoolManagementMBean.getNodeMetadata()
to get more information about cluster nodes when using pool mode.The cluster state is returned in
TabularData
format - one row is returned per cluster member. Each row contains the following information:Field Open Type Description node-id
Integer
Rhino cluster node id
host
String
Name of the host on which the node is running
node-type
String
Type of node, either "event-router" or "quorum"
start-time
Date
Start time of the cluster node
up-time
Long
Time the cluster node has been running in milliseconds
slee-state
String
SLEE state
active-alarms
Integer
Number of active alarms on the cluster node
- Returns:
TabularData
containing node status information.- Throws:
ManagementException
- if an internal error occurs.- See Also:
PoolManagementMBean.getNodeMetadata()
-
getDomainConfig
TabularData getDomainConfig() throws ManagementException
Returns the current domain configuration.
The domain config is returned in
TabularData
format - one row is returned per domain. Each row contains the following information:Field Open Type Description domain
String
Domain name
memdb-resources
String[]
Array of memdb resource names
ah-resources
String[]
Array of AH resource names
nodes
Integer[]
Nodes associated with this domain
- Returns:
TabularData
containing node status information.- Throws:
ManagementException
- if an internal error occurs.
-
getReplicatedMemDBStripingConfig
TabularData getReplicatedMemDBStripingConfig() throws ManagementException
Returns the current MemDB striping configuration for replicated MemDB instances.
The striping config is returned in
TabularData
format - one row is returned per replicated MemDB instance. Each row contains the following information:Field Open Type Description memdb-resource
String
Memdb resource name
stripe-count
Integer
The stripe count
stripe-offset
Integer
The stripe offset
- Returns:
TabularData
containing node striping configuration information.- Throws:
ManagementException
- if an internal error occurs.
-
getVersion
CompositeData getVersion() throws AttributeNotFoundException, ManagementException
Returns Rhino version information as CompositeData.
The CompositeData has the following fields, which are all of type
String
:-
Product
-
Version
-
Release
-
Build
-
Revision
- Returns:
CompositeData
containing detailed Rhino version information- Throws:
AttributeNotFoundException
- if the MBean implementation does not support this method (Rhino versions prior to 2.2 don’t)ManagementException
- if an internal error occurs
-
-
getSnapshotHostAddress
String getSnapshotHostAddress() throws ManagementException
Returns a textual representation of the IP address of the network interface the node is using for streaming snapshot data.
- Throws:
ManagementException
- if the snapshot server is not currently operational.- Since:
- Rhino 3.2
-
getSnapshotPort
int getSnapshotPort() throws ManagementException
Returns the port the currently connected node uses for streaming snapshot data.
- Throws:
ManagementException
- if the snapshot server is not currently operational.
-
flushKeyValueStores
void flushKeyValueStores() throws ManagementException
Request that all application state waiting for persistence in all key/value stores in all event router nodes in the cluster be persisted to the backing database as soon as possible.
Any unwritten application state buffered in the key/value stores at the time this operation is invoked will be flushed. Any further application state committed after the flush operation is initiated will be persisted at some future time in accordance with normal key/value store behaviour.
This method blocks until the flush operation has completed.
- Throws:
ManagementException
- if an internal error occurs.
-
flushKeyValueStores
void flushKeyValueStores(int[] nodeIDs) throws NullPointerException, InvalidArgumentException, ManagementException
Request that all application state waiting for persistence in all key/value stores in the specified event router nodes be persisted to the backing database as soon as possible.
Any unwritten application state buffered in the key/value stores at the time this operation is invoked will be flushed. Any further application state committed after the flush operation is initiated will be persisted at some future time in accordance with normal key/value store behaviour.
This method blocks until the flush operation has completed.
When using the pool clustering mode, this method can only be used to flush the key value stores on this node.
- Parameters:
nodeIDs
- the node IDs of the nodes to flush. These must be event router nodes. When using the pool clustering mode, only the node ID of this node is acceptable.- Throws:
NullPointerException
- ifnodeIDs
isnull
.InvalidArgumentException
- if any of the node IDs are invalid or not currently live event router nodes as determined bygetEventRouterNodes()
.ManagementException
- if an internal error occurs.
-
flushConfiguration
void flushConfiguration() throws ManagementException
Request that all configuration state waiting for persistence be persisted to the management database as soon as possible.
This method is unnecessary during normal operation as configuration changes are usually persisted to the database within seconds (assuming availability). This method is primarily intended for automated systems which require certainty that configuration changes have been persisted.
This method blocks until the flush operation has completed.
- Throws:
ManagementException
- if an internal error occurs.
-
getKeyValueStoreStatus
TabularData getKeyValueStoreStatus(int[] nodeIDs) throws NullPointerException, InvalidArgumentException, ManagementException
Get the current operational status of the key/value stores on the specified nodes.
The status is returned in
TabularData
format - one row is returned per (node, name) tuple. Each row contains the following information:Field Open Type Description node
integer
Node ID
name
String
Name of the key/value store
status
String
Operational status
The following status values are universally defined:
-
booting
- denotes that the indicated node is still booting up and initialising. For nodes in this state, thename
column has anull
value. -
n/a
- denotes that the indicated node has no namespace using a key/value store or the node is a quorum node. For nodes in this state, thename
column has anull
value.
The Cassandra Key/Value Store also defines the follow status values:
-
connection failure
- if a database connection for any Rhino persistence instance used by the key/value store cannot be established. -
rebuilding tables
- if all required database connections are up but some connections still require database keyspaces and/or tables to be set up. -
in sync
- if all database connections are up and all database keyspaces and tables have been set up.
When using the pool clustering mode, this method can only be used to get the key/value store status for this node. Specifying any other node ID will result in an
InvalidArgumentException
being thrown.- Parameters:
nodeIDs
- the node IDs of the nodes to get status information for.- Returns:
TabularData
containing key/value store status information.- Throws:
NullPointerException
- ifnodeIDs
isnull
.InvalidArgumentException
- if any of the node IDs are invalid or not current cluster members as determined bygetAllClusterNodes()
.ManagementException
- if an internal error occurs.- Since:
- Rhino 3.0.0
-
-
getSessionOwnershipStoreStatus
TabularData getSessionOwnershipStoreStatus(int[] nodeIDs) throws NullPointerException, InvalidArgumentException, ManagementException
Get the current operational status of the session ownership store on the specified nodes.
The status is returned in
TabularData
format - one row is returned per node ID. Each row contains the following information:Field Open Type Description node
integer
Node ID
status
String
Operational status
The following status values are universally defined:
-
booting
- denotes that the indicated node is still booting up and initialising. -
n/a
- denotes that the indicated node has no session ownership store configured or is a quorum node.
The Cassandra Session Ownership Store also defines the follow status values:
-
connection failure
- if a database connection for any Rhino persistence instance used by the session ownership store cannot be established. -
rebuilding tables
- if all required database connections are up but some connections still require database keyspaces and/or tables to be set up. -
in sync
- if all database connections are up and all database keyspaces and tables have been set up.
When using the pool clustering mode, this method can only be used to get the session ownership store status for this node. Specifying any other node ID will result in an
InvalidArgumentException
being thrown.- Parameters:
nodeIDs
- the node IDs of the nodes to get status information for.- Returns:
TabularData
containing session ownership store status information.- Throws:
NullPointerException
- ifnodeIDs
isnull
.InvalidArgumentException
- if any of the node IDs are invalid or not current cluster members as determined bygetAllClusterNodes()
.ManagementException
- if an internal error occurs.- Since:
- Rhino 3.0.0
-
-
-