Package org.apache.hadoop.hbase.ipc
Class DelegatingHBaseRpcController
java.lang.Object
org.apache.hadoop.hbase.ipc.DelegatingHBaseRpcController
- All Implemented Interfaces:
CellScannable,HBaseRpcController,org.apache.hbase.thirdparty.com.google.protobuf.RpcController
Simple delegating controller for use with the
RpcControllerFactory to help override
standard behavior of a HBaseRpcController. Used testing.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.ipc.HBaseRpcController
HBaseRpcController.CancellationCallback -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns A CellScanner over the containedCellsbooleanfailed()intReturn the failed exception, null if not failed.intReturns The priority of this requestGet the map of request attributesReturns Region's table name or null if not available or pertinent.booleanbooleanvoidnotifyOnCancel(org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<Object> callback) A little different from the basic RpcController: You can register multiple callbacks to anHBaseRpcController. The callback will not be called if the rpc call is finished without any cancellation. You can call me at client side also.voidnotifyOnCancel(org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<Object> callback, HBaseRpcController.CancellationCallback action) If not cancelled, add the callback to cancellation callback list.voidreset()voidsetCallTimeout(int callTimeout) voidsetCellScanner(CellScanner cellScanner) Only used to send cells to rpc server, the returned cells should be set byHBaseRpcController.setDone(CellScanner).voidsetDone(CellScanner cellScanner) IMPORTANT: always call this method if the call finished without any exception to tell theHBaseRpcControllerthat we are done.voidSet failed with an exception to pass on.voidvoidsetPriority(int priority) Set the priority for this operation.voidsetPriority(TableName tn) Set the priority for this operation.voidsetRequestAttributes(Map<String, byte[]> requestAttributes) Set the map of request attributesvoidsetTableName(TableName tableName) Sets Region's table name.voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.ipc.HBaseRpcController
getRegionInfo, hasRegionInfo
-
Field Details
-
delegate
-
-
Constructor Details
-
DelegatingHBaseRpcController
-
-
Method Details
-
reset
- Specified by:
resetin interfaceorg.apache.hbase.thirdparty.com.google.protobuf.RpcController
-
failed
- Specified by:
failedin interfaceorg.apache.hbase.thirdparty.com.google.protobuf.RpcController
-
errorText
- Specified by:
errorTextin interfaceorg.apache.hbase.thirdparty.com.google.protobuf.RpcController
-
startCancel
- Specified by:
startCancelin interfaceorg.apache.hbase.thirdparty.com.google.protobuf.RpcController
-
setFailed
- Specified by:
setFailedin interfaceorg.apache.hbase.thirdparty.com.google.protobuf.RpcController
-
isCanceled
- Specified by:
isCanceledin interfaceorg.apache.hbase.thirdparty.com.google.protobuf.RpcController
-
notifyOnCancel
public void notifyOnCancel(org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<Object> callback) Description copied from interface:HBaseRpcControllerA 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.
- Specified by:
notifyOnCancelin interfaceHBaseRpcController- Specified by:
notifyOnCancelin interfaceorg.apache.hbase.thirdparty.com.google.protobuf.RpcController
- You can register multiple callbacks to an
-
cellScanner
Description copied from interface:CellScannableReturns A CellScanner over the containedCells- Specified by:
cellScannerin interfaceCellScannable
-
setCellScanner
Description copied from interface:HBaseRpcControllerOnly used to send cells to rpc server, the returned cells should be set byHBaseRpcController.setDone(CellScanner).- Specified by:
setCellScannerin interfaceHBaseRpcController
-
setPriority
Description copied from interface:HBaseRpcControllerSet the priority for this operation.- Specified by:
setPriorityin interfaceHBaseRpcController- Parameters:
priority- Priority for this request; should fall roughly in the rangeHConstants.NORMAL_QOStoHConstants.HIGH_QOS
-
setPriority
Description copied from interface:HBaseRpcControllerSet the priority for this operation.- Specified by:
setPriorityin interfaceHBaseRpcController- Parameters:
tn- Set priority based off the table we are going against.
-
getPriority
Description copied from interface:HBaseRpcControllerReturns The priority of this request- Specified by:
getPriorityin interfaceHBaseRpcController
-
getCallTimeout
- Specified by:
getCallTimeoutin interfaceHBaseRpcController
-
setCallTimeout
- Specified by:
setCallTimeoutin interfaceHBaseRpcController
-
hasCallTimeout
- Specified by:
hasCallTimeoutin interfaceHBaseRpcController
-
getRequestAttributes
Description copied from interface:HBaseRpcControllerGet the map of request attributes- Specified by:
getRequestAttributesin interfaceHBaseRpcController
-
setRequestAttributes
Description copied from interface:HBaseRpcControllerSet the map of request attributes- Specified by:
setRequestAttributesin interfaceHBaseRpcController
-
setFailed
Description copied from interface:HBaseRpcControllerSet failed with an exception to pass on. For use in async rpc clients- Specified by:
setFailedin interfaceHBaseRpcController- Parameters:
e- exception to set with
-
getFailed
Description copied from interface:HBaseRpcControllerReturn the failed exception, null if not failed.- Specified by:
getFailedin interfaceHBaseRpcController
-
setDone
Description copied from interface:HBaseRpcControllerIMPORTANT: always call this method if the call finished without any exception to tell theHBaseRpcControllerthat we are done.- Specified by:
setDonein interfaceHBaseRpcController
-
notifyOnCancel
public void notifyOnCancel(org.apache.hbase.thirdparty.com.google.protobuf.RpcCallback<Object> callback, HBaseRpcController.CancellationCallback action) throws IOException Description copied from interface:HBaseRpcControllerIf not cancelled, add the callback to cancellation callback list. And then execute the action with the cancellation state as a parameter. The implementation should guarantee that the cancellation state does not change during this call.- Specified by:
notifyOnCancelin interfaceHBaseRpcController- Throws:
IOException
-
setTableName
Description copied from interface:HBaseRpcControllerSets Region's table name.- Specified by:
setTableNamein interfaceHBaseRpcController
-
getTableName
Description copied from interface:HBaseRpcControllerReturns Region's table name or null if not available or pertinent.- Specified by:
getTableNamein interfaceHBaseRpcController
-