@InterfaceAudience.Private @InterfaceStability.Evolving public class RegionServerQuotaManager extends Object
Modifier and Type | Field and Description |
---|---|
private static org.apache.commons.logging.Log |
LOG |
private QuotaCache |
quotaCache |
private RegionServerServices |
rsServices |
Constructor and Description |
---|
RegionServerQuotaManager(RegionServerServices rsServices) |
Modifier and Type | Method and Description |
---|---|
private OperationQuota |
checkQuota(Region region,
int numWrites,
int numReads,
int numScans)
Check the quota for the current (rpc-context) user.
|
OperationQuota |
checkQuota(Region region,
List<org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Action> actions)
Check the quota for the current (rpc-context) user.
|
OperationQuota |
checkQuota(Region region,
OperationQuota.OperationType type)
Check the quota for the current (rpc-context) user.
|
OperationQuota |
getQuota(org.apache.hadoop.security.UserGroupInformation ugi,
TableName table)
Returns the quota for an operation.
|
(package private) QuotaCache |
getQuotaCache() |
boolean |
isQuotaEnabled() |
void |
start(RpcScheduler rpcScheduler) |
void |
stop() |
private static final org.apache.commons.logging.Log LOG
private final RegionServerServices rsServices
private QuotaCache quotaCache
public RegionServerQuotaManager(RegionServerServices rsServices)
public void start(RpcScheduler rpcScheduler) throws IOException
IOException
public void stop()
public boolean isQuotaEnabled()
QuotaCache getQuotaCache()
public OperationQuota getQuota(org.apache.hadoop.security.UserGroupInformation ugi, TableName table)
ugi
- the user that is executing the operationtable
- the table where the operation will be executedpublic OperationQuota checkQuota(Region region, OperationQuota.OperationType type) throws IOException, ThrottlingException
region
- the region where the operation will be performedtype
- the operation typeThrottlingException
- if the operation cannot be executed due to quota exceeded.IOException
public OperationQuota checkQuota(Region region, List<org.apache.hadoop.hbase.protobuf.generated.ClientProtos.Action> actions) throws IOException, ThrottlingException
region
- the region where the operation will be performedactions
- the "multi" actions to performThrottlingException
- if the operation cannot be executed due to quota exceeded.IOException
private OperationQuota checkQuota(Region region, int numWrites, int numReads, int numScans) throws IOException, ThrottlingException
region
- the region where the operation will be performednumWrites
- number of writes to performnumReads
- number of short-reads to performnumScans
- number of scan to performThrottlingException
- if the operation cannot be executed due to quota exceeded.IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.