@InterfaceAudience.Private public class MonitoredRPCHandlerImpl extends MonitoredTaskImpl implements MonitoredRPCHandler
MonitoredTask.State, MonitoredTask.StatusJournalEntry
Modifier and Type | Field and Description |
---|---|
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 |
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.
|
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, disableStatusJournal, enableStatusJournal, expireNow, getCompletionTimestamp, getDescription, getStartTime, getState, getStateTime, getStatusJournal, getStatusTime, getWarnTime, pause, prettyPrintJournal, resume, setDescription, setState, setStatus, setWarnTime, toJSON
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
abort, cleanup, disableStatusJournal, enableStatusJournal, expireNow, getCompletionTimestamp, getDescription, getStartTime, getState, getStateTime, getStatusJournal, getStatusTime, getWarnTime, pause, prettyPrintJournal, resume, setDescription, setStatus, setWarnTime, toJSON
private String clientAddress
private int remotePort
private long rpcQueueTime
private long rpcStartTime
private String methodName
private org.apache.hbase.thirdparty.com.google.protobuf.Message packet
public MonitoredRPCHandlerImpl()
public MonitoredRPCHandlerImpl clone()
MonitoredTask
clone
in interface MonitoredTask
clone
in class MonitoredTaskImpl
public String getStatus()
getStatus
in interface MonitoredTask
getStatus
in class MonitoredTaskImpl
public long getRPCQueueTime()
getRPCQueueTime
in interface MonitoredRPCHandler
public long getRPCStartTime()
getRPCStartTime
in interface MonitoredRPCHandler
public String getRPC()
getRPC
in interface MonitoredRPCHandler
public String getRPC(boolean withParams)
getRPC
in interface MonitoredRPCHandler
withParams
- toggle inclusion of parameters in the RPC Stringpublic long getRPCPacketLength()
getRPCPacketLength
in interface MonitoredRPCHandler
public String getClient()
getClient
in interface MonitoredRPCHandler
public boolean isRPCRunning()
isRPCRunning
in interface MonitoredRPCHandler
public boolean isOperationRunning()
isOperationRunning
in interface MonitoredRPCHandler
public void setRPC(String methodName, Object[] params, long queueTime)
setRPC
in interface MonitoredRPCHandler
methodName
- 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 MonitoredRPCHandler
param
- The protobuf received by the RPC for this callpublic void setConnection(String clientAddress, int remotePort)
setConnection
in interface MonitoredRPCHandler
clientAddress
- the address of the current clientremotePort
- the port from which the client connectedpublic void markComplete(String status)
markComplete
in interface MonitoredTask
markComplete
in class MonitoredTaskImpl
public Map<String,Object> toMap()
MonitoredTask
toMap
in interface MonitoredTask
toMap
in class MonitoredTaskImpl
public String toString()
toString
in class MonitoredTaskImpl
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.