Package org.apache.hadoop.hbase.quotas
Class ExceedOperationQuota
java.lang.Object
org.apache.hadoop.hbase.quotas.DefaultOperationQuota
org.apache.hadoop.hbase.quotas.ExceedOperationQuota
- All Implemented Interfaces:
OperationQuota
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static interfaceNested classes/interfaces inherited from interface org.apache.hadoop.hbase.quotas.OperationQuota
OperationQuota.OperationType -
Field Summary
FieldsFields inherited from class org.apache.hadoop.hbase.quotas.DefaultOperationQuota
handlerUsageTimeConsumed, handlerUsageTimeDiff, limiters, readAvailable, readCapacityUnitConsumed, readCapacityUnitDiff, readConsumed, readDiff, writeCapacityUnitConsumed, writeCapacityUnitDiff, writeConsumed, writeDiffFields inherited from interface org.apache.hadoop.hbase.quotas.OperationQuota
USE_RESULT_SIZE_BYTES, USE_RESULT_SIZE_BYTES_DEFAULT -
Constructor Summary
ConstructorsConstructorDescriptionExceedOperationQuota(org.apache.hadoop.conf.Configuration conf, int blockSizeBytes, double requestsPerSecond, QuotaLimiter regionServerLimiter, QuotaLimiter... limiters) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckBatchQuota(int numWrites, int numReads, boolean isAtomic) Checks if it is possible to execute the specified operation.private voidcheckQuota(Runnable estimateQuota, ExceedOperationQuota.CheckQuotaRunnable checkQuota, int numWrites, int numReads, int numScans, boolean isAtomic) voidcheckScanQuota(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.voidclose()Cleanup method on operation completionMethods inherited from class org.apache.hadoop.hbase.quotas.DefaultOperationQuota
addGetResult, addMutation, addScanResult, addScanResultCells, getReadAvailable, getReadConsumed, getScanReadConsumeEstimate, updateEstimateConsumeBatchQuota, updateEstimateConsumeScanQuotaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.quotas.OperationQuota
getMaxResultSize
-
Field Details
-
LOG
-
regionServerLimiter
-
-
Constructor Details
-
ExceedOperationQuota
public ExceedOperationQuota(org.apache.hadoop.conf.Configuration conf, int blockSizeBytes, double requestsPerSecond, QuotaLimiter regionServerLimiter, QuotaLimiter... limiters)
-
-
Method Details
-
checkBatchQuota
public void checkBatchQuota(int numWrites, int numReads, boolean isAtomic) throws RpcThrottlingException Description copied from interface:OperationQuotaChecks if it is possible to execute the specified operation. The quota will be estimated based on the number of operations to perform and the average size accumulated during time.- Specified by:
checkBatchQuotain interfaceOperationQuota- Overrides:
checkBatchQuotain classDefaultOperationQuota- Parameters:
numWrites- number of write operation that will be performednumReads- number of small-read operation that will be performed- Throws:
RpcThrottlingException- if the operation cannot be performed because RPC quota is exceeded.
-
checkScanQuota
public void checkScanQuota(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest scanRequest, long maxScannerResultSize, long maxBlockBytesScanned, long prevBlockBytesScannedDifference) throws RpcThrottlingException Description copied from interface:OperationQuotaChecks if it is possible to execute the scan. The quota will be estimated based on the composition of the scan.- Specified by:
checkScanQuotain interfaceOperationQuota- Overrides:
checkScanQuotain classDefaultOperationQuota- Parameters:
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 calls- Throws:
RpcThrottlingException- if the operation cannot be performed because RPC quota is exceeded.
-
checkQuota
private void checkQuota(Runnable estimateQuota, ExceedOperationQuota.CheckQuotaRunnable checkQuota, int numWrites, int numReads, int numScans, boolean isAtomic) throws RpcThrottlingException - Throws:
RpcThrottlingException
-
close
Description copied from interface:OperationQuotaCleanup method on operation completion- Specified by:
closein interfaceOperationQuota- Overrides:
closein classDefaultOperationQuota
-