Interface RpcQuotaManager

All Known Implementing Classes:
RegionServerRpcQuotaManager

@LimitedPrivate("Coprocesssor") @Evolving public interface RpcQuotaManager
  • Method Details

    • checkScanQuota

      OperationQuota checkScanQuota(Region region, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.ScanRequest scanRequest, long maxScannerResultSize, long maxBlockBytesScanned, long prevBlockBytesScannedDifference) throws IOException, RpcThrottlingException
      Check the quota for the current (rpc-context) user. Returns the OperationQuota used to get the available quota and to report the data/usage of the operation. This method is specific to scans because estimating a scan's workload is more complicated than estimating the workload of a get/put.
      Parameters:
      region - the region where the operation will be performed
      scanRequest - the scan to be estimated against the quota
      maxScannerResultSize - the maximum bytes to be returned by the scanner
      maxBlockBytesScanned - the maximum bytes scanned in a single RPC call by the scanner
      prevBlockBytesScannedDifference - the difference between BBS of the previous two next calls
      Returns:
      the OperationQuota
      Throws:
      RpcThrottlingException - if the operation cannot be executed due to quota exceeded.
      IOException
    • checkBatchQuota

      Check the quota for the current (rpc-context) user. Returns the OperationQuota used to get the available quota and to report the data/usage of the operation. This method does not support scans because estimating a scan's workload is more complicated than estimating the workload of a get/put.
      Parameters:
      region - the region where the operation will be performed
      type - the operation type
      Returns:
      the OperationQuota
      Throws:
      RpcThrottlingException - if the operation cannot be executed due to quota exceeded.
      IOException
    • checkBatchQuota

      OperationQuota checkBatchQuota(Region region, List<org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.Action> actions, boolean hasCondition) throws IOException, RpcThrottlingException
      Check the quota for the current (rpc-context) user. Returns the OperationQuota used to get the available quota and to report the data/usage of the operation. This method does not support scans because estimating a scan's workload is more complicated than estimating the workload of a get/put.
      Parameters:
      region - the region where the operation will be performed
      actions - the "multi" actions to perform
      hasCondition - whether the RegionAction has a condition
      Returns:
      the OperationQuota
      Throws:
      RpcThrottlingException - if the operation cannot be executed due to quota exceeded.
      IOException
    • checkBatchQuota

      OperationQuota checkBatchQuota(Region region, int numWrites, int numReads) throws IOException, RpcThrottlingException
      Check the quota for the current (rpc-context) user. Returns the OperationQuota used to get the available quota and to report the data/usage of the operation. This method does not support scans because estimating a scan's workload is more complicated than estimating the workload of a get/put.
      Parameters:
      region - the region where the operation will be performed
      numWrites - number of writes to count against quota
      numReads - number of reads to count against quota
      Returns:
      the OperationQuota
      Throws:
      RpcThrottlingException - if the operation cannot be executed due to quota exceeded.
      IOException