@InterfaceAudience.Private public class MonitoredRPCHandlerImpl extends MonitoredTaskImpl implements MonitoredRPCHandler
MonitoredTask.State, MonitoredTask.StatusJournalEntry| Modifier and Type | Field and Description |
|---|---|
private Map<String,Object> |
callInfoMap |
private String |
clientAddress |
private String |
methodName |
private org.apache.hbase.thirdparty.com.google.protobuf.Message |
packet |
private Object[] |
params |
private int |
remotePort |
private long |
rpcQueueTime |
private long |
rpcStartTime |
private boolean |
snapshot |
state| Constructor and Description |
|---|
MonitoredRPCHandlerImpl() |
| Modifier and Type | Method and Description |
|---|---|
MonitoredRPCHandlerImpl |
clone()
Public exposure of Object.clone() in order to allow clients to easily capture current state.
|
private Map<String,Object> |
generateCallInfoMap() |
String |
getClient()
If an RPC call is currently running, produces a String representation of the connection from
which it was received.
|
String |
getRPC()
Produces a string representation of the method currently being serviced by this Handler.
|
String |
getRPC(boolean withParams)
Produces a string representation of the method currently being serviced by this Handler.
|
long |
getRPCPacketLength()
Produces a string representation of the method currently being serviced by this Handler.
|
long |
getRPCQueueTime()
Accesses the queue time for the currently running RPC on the monitored Handler.
|
long |
getRPCStartTime()
Accesses the start time for the currently running RPC on the monitored Handler.
|
String |
getStatus()
Gets the status of this handler; if it is currently servicing an RPC, this status will include
the RPC information.
|
boolean |
isOperationRunning()
Indicates to the client whether this task is monitoring a currently active RPC call to a
database command.
|
boolean |
isRPCRunning()
Indicates to the client whether this task is monitoring a currently active RPC call.
|
void |
markComplete(String status) |
void |
setConnection(String clientAddress,
int remotePort)
Registers current handler client details.
|
void |
setRPC(String methodName,
Object[] params,
long queueTime)
Tells this instance that it is monitoring a new RPC call.
|
void |
setRPCPacket(org.apache.hbase.thirdparty.com.google.protobuf.Message param)
Gives this instance a reference to the protobuf received by the RPC, so that it can later
compute its size if asked for it.
|
Map<String,Object> |
toMap()
Creates a string map of internal details for extensible exposure of monitored tasks.
|
String |
toString() |
abort, cleanup, expireNow, getCompletionTimestamp, getDescription, getStartTime, getState, getStateTime, getStatusJournal, getStatusTime, getWarnTime, pause, prettyPrintJournal, resume, setDescription, setState, setStatus, setWarnTime, toJSONequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitabort, cleanup, expireNow, getCompletionTimestamp, getDescription, getStartTime, getState, getStateTime, getStatusJournal, getStatusTime, getWarnTime, pause, prettyPrintJournal, resume, setDescription, setStatus, setWarnTime, toJSONprivate String clientAddress
private int remotePort
private long rpcQueueTime
private long rpcStartTime
private String methodName
private org.apache.hbase.thirdparty.com.google.protobuf.Message packet
private boolean snapshot
private Map<String,Object> callInfoMap
public MonitoredRPCHandlerImpl()
public MonitoredRPCHandlerImpl clone()
MonitoredTaskclone in interface MonitoredTaskclone in class MonitoredTaskImplpublic String getStatus()
getStatus in interface MonitoredTaskgetStatus in class MonitoredTaskImplpublic long getRPCQueueTime()
getRPCQueueTime in interface MonitoredRPCHandlerpublic long getRPCStartTime()
getRPCStartTime in interface MonitoredRPCHandlerpublic String getRPC()
getRPC in interface MonitoredRPCHandlerpublic String getRPC(boolean withParams)
getRPC in interface MonitoredRPCHandlerwithParams - toggle inclusion of parameters in the RPC Stringpublic long getRPCPacketLength()
getRPCPacketLength in interface MonitoredRPCHandlerpublic String getClient()
getClient in interface MonitoredRPCHandlerpublic boolean isRPCRunning()
isRPCRunning in interface MonitoredRPCHandlerpublic boolean isOperationRunning()
isOperationRunning in interface MonitoredRPCHandlerpublic void setRPC(String methodName, Object[] params, long queueTime)
setRPC in interface MonitoredRPCHandlermethodName - The name of the method that will be called by the RPC.params - The parameters that will be passed to the indicated method.public void setRPCPacket(org.apache.hbase.thirdparty.com.google.protobuf.Message param)
setRPCPacket in interface MonitoredRPCHandlerparam - The protobuf received by the RPC for this callpublic void setConnection(String clientAddress, int remotePort)
setConnection in interface MonitoredRPCHandlerclientAddress - the address of the current clientremotePort - the port from which the client connectedpublic void markComplete(String status)
markComplete in interface MonitoredTaskmarkComplete in class MonitoredTaskImplpublic Map<String,Object> toMap()
MonitoredTasktoMap in interface MonitoredTasktoMap in class MonitoredTaskImplprivate Map<String,Object> generateCallInfoMap()
public String toString()
toString in class MonitoredTaskImplCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.