@InterfaceAudience.Private
@InterfaceStability.Evolving
public interface OperationQuota
| Modifier and Type | Interface and Description |
|---|---|
static class |
OperationQuota.OperationType |
| Modifier and Type | Field and Description |
|---|---|
static String |
USE_RESULT_SIZE_BYTES
If false, the default, then IO based throttles will consume read availability based on the
block bytes scanned by the given request.
|
static boolean |
USE_RESULT_SIZE_BYTES_DEFAULT |
| Modifier and Type | Method and Description |
|---|---|
void |
addGetResult(Result result)
Add a get result.
|
void |
addMutation(Mutation mutation)
Add a mutation result.
|
void |
addScanResult(List<Result> results)
Add a scan result.
|
void |
addScanResultCells(List<Cell> cells)
Add a scan result in the form of cells.
|
void |
checkBatchQuota(int numWrites,
int numReads)
Checks if it is possible to execute the specified operation.
|
void |
checkScanQuota(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest scanRequest,
long maxScannerResultSize,
long maxBlockBytesScanned,
long prevBlockBytesScannedDifference)
Checks if it is possible to execute the scan.
|
void |
close()
Cleanup method on operation completion
|
default long |
getMaxResultSize()
Returns the maximum result size to be returned by the given operation.
|
long |
getReadAvailable()
Returns the number of bytes available to read to avoid exceeding the quota
|
long |
getReadConsumed()
Returns the number of bytes consumed from the quota by the operation
|
static final String USE_RESULT_SIZE_BYTES
static final boolean USE_RESULT_SIZE_BYTES_DEFAULT
void checkBatchQuota(int numWrites,
int numReads)
throws RpcThrottlingException
numWrites - number of write operation that will be performednumReads - number of small-read operation that will be performedRpcThrottlingException - if the operation cannot be performed because RPC quota is
exceeded.void checkScanQuota(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest scanRequest, long maxScannerResultSize, long maxBlockBytesScanned, long prevBlockBytesScannedDifference) throws RpcThrottlingException
scanRequest - the given scan operationmaxScannerResultSize - the maximum bytes to be returned by the scannermaxBlockBytesScanned - the maximum bytes scanned in a single RPC call by the
scannerprevBlockBytesScannedDifference - the difference between BBS of the previous two next
callsRpcThrottlingException - if the operation cannot be performed because RPC quota is
exceeded.void close()
void addGetResult(Result result)
void addScanResult(List<Result> results)
void addScanResultCells(List<Cell> cells)
void addMutation(Mutation mutation)
long getReadAvailable()
long getReadConsumed()
default long getMaxResultSize()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.