Package org.apache.hadoop.hbase.ipc
Interface RpcCall
- All Superinterfaces:
RpcCallContext
- All Known Implementing Classes:
NettyServerCall
,ServerCall
,SimpleServerCall
@LimitedPrivate({"Coprocesssor","Phoenix"})
@Evolving
public interface RpcCall
extends RpcCallContext
Interface of all necessary to carry out a RPC method invocation on the server.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
Do the necessary cleanup after the call if needed.Returns The CellScanner that can carry input and result payload.Returns the map of attributes specified when building the Connection.long
Return the deadline of this call.long
org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader
Returns The request header of this call.org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor
Returns The service method.org.apache.hbase.thirdparty.com.google.protobuf.Message
getParam()
Returns The call parameter message.int
Returns The Priority of this call.long
Returns The timestamp when the call is constructed.int
Returns Port of remote address in this callbyte[]
Returns a single request attribute value, or null if no value is present.Returns the map of attributes specified when building the request.org.apache.hbase.thirdparty.com.google.protobuf.BlockingService
Returns The service of this call.long
getSize()
Used to calculate the request call queue size.long
Returns The time when the call starts to be executed.int
Returns The timeout of this call.void
Send the response of this RPC call.void
setResponse
(org.apache.hbase.thirdparty.com.google.protobuf.Message param, CellScanner cells, Throwable errorThrowable, String error) Set the response resulting from this RPC call.void
setStartTime
(long startTime) Set the time when the call starts to be executed.Returns A short string format of this call without possibly lengthy paramsvoid
updateFsReadTime
(long latencyMillis) Methods inherited from interface org.apache.hadoop.hbase.ipc.RpcCallContext
disconnectSince, getBlockBytesScanned, getClientCertificateChain, getClientVersionInfo, getRemoteAddress, getRequestUser, getRequestUserName, getResponseCellSize, getResponseExceptionSize, incrementBlockBytesScanned, incrementResponseCellSize, incrementResponseExceptionSize, isClientCellBlockSupported, isRetryImmediatelySupported, setCallBack
-
Method Details
-
getService
org.apache.hbase.thirdparty.com.google.protobuf.BlockingService getService()Returns The service of this call. -
getMethod
org.apache.hbase.thirdparty.com.google.protobuf.Descriptors.MethodDescriptor getMethod()Returns The service method. -
getParam
org.apache.hbase.thirdparty.com.google.protobuf.Message getParam()Returns The call parameter message. -
getCellScanner
Returns The CellScanner that can carry input and result payload. -
getReceiveTime
long getReceiveTime()Returns The timestamp when the call is constructed. -
getStartTime
long getStartTime()Returns The time when the call starts to be executed. -
setStartTime
Set the time when the call starts to be executed. -
getTimeout
int getTimeout()Returns The timeout of this call. -
getPriority
int getPriority()Returns The Priority of this call. -
getDeadline
long getDeadline()Return the deadline of this call. If we can not complete this call in time, we can throw a TimeoutIOException and RPCServer will drop it.- Returns:
- The system timestamp of deadline.
-
getSize
long getSize()Used to calculate the request call queue size. If the total request call size exceeds a limit, the call will be rejected.- Returns:
- The raw size of this call.
-
getHeader
org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.RequestHeader getHeader()Returns The request header of this call. -
getConnectionAttributes
Map<String,byte[]> getConnectionAttributes()Returns the map of attributes specified when building the Connection. -
getRequestAttributes
Map<String,byte[]> getRequestAttributes()Returns the map of attributes specified when building the request. This map is lazily evaluated so if you only need a single attribute then it may be cheaper to usegetRequestAttribute(String)
-
getRequestAttribute
Returns a single request attribute value, or null if no value is present. If you need many request attributes then you should fetch the lazily evaluated map viagetRequestAttributes()
-
getRemotePort
int getRemotePort()Returns Port of remote address in this call -
setResponse
void setResponse(org.apache.hbase.thirdparty.com.google.protobuf.Message param, CellScanner cells, Throwable errorThrowable, String error) Set the response resulting from this RPC call.- Parameters:
param
- The result message as response.cells
- The CellScanner that possibly carries the payload.errorThrowable
- The error Throwable resulting from the call.error
- Extra error message.
-
sendResponseIfReady
Send the response of this RPC call. Implementation provides the underlying facility (connection, etc) to send.- Throws:
IOException
-
cleanup
void cleanup()Do the necessary cleanup after the call if needed. -
toShortString
Returns A short string format of this call without possibly lengthy params -
updateFsReadTime
-
getFsReadTime
long getFsReadTime()
-