@InterfaceAudience.Private @InterfaceStability.Evolving public class RegionServerRpcQuotaManager extends Object implements RpcQuotaManager
| Constructor and Description |
|---|
RegionServerRpcQuotaManager(RegionServerServices rsServices) |
| Modifier and Type | Method and Description |
|---|---|
OperationQuota |
checkBatchQuota(Region region,
int numWrites,
int numReads)
Check the quota for the current (rpc-context) user.
|
OperationQuota |
checkBatchQuota(Region region,
List<org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Action> actions,
boolean hasCondition)
Check the quota for the current (rpc-context) user.
|
OperationQuota |
checkBatchQuota(Region region,
OperationQuota.OperationType type)
Check the quota for the current (rpc-context) user.
|
OperationQuota |
checkScanQuota(Region region,
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest scanRequest,
long maxScannerResultSize,
long maxBlockBytesScanned,
long prevBlockBytesScannedDifference)
Check the quota for the current (rpc-context) user.
|
OperationQuota |
getQuota(org.apache.hadoop.security.UserGroupInformation ugi,
TableName table,
int blockSizeBytes)
Returns the quota for an operation.
|
protected boolean |
isRpcThrottleEnabled() |
void |
start(RpcScheduler rpcScheduler) |
void |
stop() |
void |
switchRpcThrottle(boolean enable) |
public RegionServerRpcQuotaManager(RegionServerServices rsServices)
public void start(RpcScheduler rpcScheduler) throws IOException
IOExceptionpublic void stop()
protected boolean isRpcThrottleEnabled()
public void switchRpcThrottle(boolean enable)
throws IOException
IOExceptionpublic OperationQuota getQuota(org.apache.hadoop.security.UserGroupInformation ugi, TableName table, int blockSizeBytes)
ugi - the user that is executing the operationtable - the table where the operation will be executedpublic OperationQuota checkScanQuota(Region region, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest scanRequest, long maxScannerResultSize, long maxBlockBytesScanned, long prevBlockBytesScannedDifference) throws IOException, RpcThrottlingException
RpcQuotaManagercheckScanQuota in interface RpcQuotaManagerregion - the region where the operation will be performedscanRequest - the scan to be estimated against the quotamaxScannerResultSize - 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 executed due to quota exceeded.IOExceptionpublic OperationQuota checkBatchQuota(Region region, OperationQuota.OperationType type) throws IOException, RpcThrottlingException
RpcQuotaManagercheckBatchQuota in interface RpcQuotaManagerregion - the region where the operation will be performedtype - the operation typeRpcThrottlingException - if the operation cannot be executed due to quota exceeded.IOExceptionpublic OperationQuota checkBatchQuota(Region region, List<org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Action> actions, boolean hasCondition) throws IOException, RpcThrottlingException
RpcQuotaManagercheckBatchQuota in interface RpcQuotaManagerregion - the region where the operation will be performedactions - the "multi" actions to performhasCondition - whether the RegionAction has a conditionRpcThrottlingException - if the operation cannot be executed due to quota exceeded.IOExceptionpublic OperationQuota checkBatchQuota(Region region, int numWrites, int numReads) throws IOException, RpcThrottlingException
checkBatchQuota in interface RpcQuotaManagerregion - the region where the operation will be performednumWrites - number of writes to performnumReads - number of short-reads to performRpcThrottlingException - if the operation cannot be executed due to quota exceeded.IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.