The feature exposes information using JMX or MBeans. Doing so you can inspect the current state of the standby and the master using the JMX console. The information can be found in an MBean of type org.apache.jackrabbit.oak:type="Standby" named Status.
Standby
Observing a standby instance you will expose one node. The ID is usually a generic UUID.
This node has five read-only attributes:
- Running: boolean value indicating whether the sync process is running or not.
- Mode: Client: followed by the UUID used to identify the instance. Note that this UUID will change every time the configuration is updated.
- Status: a textual representation of the current state (like running or stopped).
- FailedRequests: the number of consecutive errors.
- SecondsSinceLastSuccess: the number of seconds since the last successful communication with the server. It will display -1 if no successful communication has been made.
There are also three invokable methods:
- start(): starts the sync process.
- stop(): stops the sync process.
- cleanup(): runs the cleanup operation on the standby.
Primary
Observing the primary exposes some general information via a MBean whose ID value is the port number the TarMK standby service is using (8023 by default). Most of the methods and attributes are the same as for the standby, but some differ:
- Mode: will always show the value primary.
Furthermore information for up to 10 clients (standby instances) that are connected to the master can be retrieved. The MBean ID is the UUID of the instance. There are no invokable methods for these MBeans but some very useful readonly attributes:
- Name: the ID of the client.
- LastSeenTimestamp: the timestamp of the last request in a textual representation.
- LastRequest: the last request of the client.
- RemoteAddress: the IP address of the client.
- RemotePort: the port the client used for the last request.
- TransferredSegments: the total number of segments transferred to this client.
- TransferredSegmentBytes: the total number of bytes transferred to this client.
No comments:
Post a Comment