@InterfaceAudience.LimitedPrivate(value={"Coprocesssor","Phoenix","Replication"}) @InterfaceStability.Evolving public interface HBaseRpcController extends org.apache.hbase.thirdparty.com.google.protobuf.RpcController, CellScannable
Modifier and Type | Interface and Description |
---|---|
static interface |
HBaseRpcController.CancellationCallback |
Modifier and Type | Method and Description |
---|---|
int |
getCallTimeout() |
IOException |
getFailed()
Return the failed exception, null if not failed.
|
int |
getPriority()
Returns The priority of this request
|
default RegionInfo |
getRegionInfo()
Returns Target Region's RegionInfo or null if not available or pertinent.
|
boolean |
hasCallTimeout() |
default boolean |
hasRegionInfo()
Returns True if this Controller is carrying the RPC target Region's RegionInfo.
|
void |
notifyOnCancel(org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<Object> callback)
A little different from the basic RpcController:
You can register multiple callbacks to an
HBaseRpcController .
The callback will not be called if the rpc call is finished without any cancellation.
You can call me at client side also.
|
void |
notifyOnCancel(org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<Object> callback,
HBaseRpcController.CancellationCallback action)
If not cancelled, add the callback to cancellation callback list.
|
void |
setCallTimeout(int callTimeout) |
void |
setCellScanner(CellScanner cellScanner)
Only used to send cells to rpc server, the returned cells should be set by
setDone(CellScanner) . |
void |
setDone(CellScanner cellScanner)
IMPORTANT: always call this method if the call finished without any exception to tell
the
HBaseRpcController that we are done. |
void |
setFailed(IOException e)
Set failed with an exception to pass on.
|
void |
setPriority(int priority)
Set the priority for this operation.
|
void |
setPriority(TableName tn)
Set the priority for this operation.
|
errorText, failed, isCanceled, reset, setFailed, startCancel
cellScanner
void setCellScanner(CellScanner cellScanner)
setDone(CellScanner)
.void setPriority(int priority)
priority
- Priority for this request; should fall roughly in the range
HConstants.NORMAL_QOS
to HConstants.HIGH_QOS
void setPriority(TableName tn)
tn
- Set priority based off the table we are going against.int getPriority()
int getCallTimeout()
void setCallTimeout(int callTimeout)
boolean hasCallTimeout()
void setFailed(IOException e)
e
- exception to set withIOException getFailed()
void setDone(CellScanner cellScanner)
HBaseRpcController
that we are done.void notifyOnCancel(org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<Object> callback)
HBaseRpcController
.notifyOnCancel
in interface org.apache.hbase.thirdparty.com.google.protobuf.RpcController
void notifyOnCancel(org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<Object> callback, HBaseRpcController.CancellationCallback action) throws IOException
IOException
default boolean hasRegionInfo()
default RegionInfo getRegionInfo()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.