@InterfaceAudience.Private @InterfaceStability.Evolving public class ExceedOperationQuota extends DefaultOperationQuota
Modifier and Type | Class and Description |
---|---|
private static interface |
ExceedOperationQuota.CheckQuotaRunnable |
OperationQuota.OperationType
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private QuotaLimiter |
regionServerLimiter |
limiters, readAvailable, readCapacityUnitConsumed, readCapacityUnitDiff, readConsumed, readDiff, writeCapacityUnitConsumed, writeCapacityUnitDiff, writeConsumed, writeDiff
USE_RESULT_SIZE_BYTES, USE_RESULT_SIZE_BYTES_DEFAULT
Constructor and Description |
---|
ExceedOperationQuota(org.apache.hadoop.conf.Configuration conf,
int blockSizeBytes,
QuotaLimiter regionServerLimiter,
QuotaLimiter... limiters) |
Modifier and Type | Method and Description |
---|---|
void |
checkBatchQuota(int numWrites,
int numReads)
Checks if it is possible to execute the specified operation.
|
private void |
checkQuota(Runnable estimateQuota,
ExceedOperationQuota.CheckQuotaRunnable checkQuota,
int numWrites,
int numReads,
int numScans) |
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
|
addGetResult, addMutation, addScanResult, getReadAvailable, getReadConsumed, getScanReadConsumeEstimate, updateEstimateConsumeBatchQuota, updateEstimateConsumeScanQuota
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMaxResultSize
private static final org.slf4j.Logger LOG
private QuotaLimiter regionServerLimiter
public ExceedOperationQuota(org.apache.hadoop.conf.Configuration conf, int blockSizeBytes, QuotaLimiter regionServerLimiter, QuotaLimiter... limiters)
public void checkBatchQuota(int numWrites, int numReads) throws RpcThrottlingException
OperationQuota
checkBatchQuota
in interface OperationQuota
checkBatchQuota
in class DefaultOperationQuota
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.public void checkScanQuota(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest scanRequest, long maxScannerResultSize, long maxBlockBytesScanned, long prevBlockBytesScannedDifference) throws RpcThrottlingException
OperationQuota
checkScanQuota
in interface OperationQuota
checkScanQuota
in class DefaultOperationQuota
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.private void checkQuota(Runnable estimateQuota, ExceedOperationQuota.CheckQuotaRunnable checkQuota, int numWrites, int numReads, int numScans) throws RpcThrottlingException
RpcThrottlingException
public void close()
OperationQuota
close
in interface OperationQuota
close
in class DefaultOperationQuota
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.