Class NoopOperationQuota

java.lang.Object
org.apache.hadoop.hbase.quotas.NoopOperationQuota
All Implemented Interfaces:
OperationQuota

@Private @Evolving class NoopOperationQuota extends Object implements OperationQuota
Noop operation quota returned when no quota is associated to the user/table
  • Field Details

  • Constructor Details

  • Method Details

    • get

      public static OperationQuota get()
    • checkBatchQuota

      public void checkBatchQuota(int numWrites, int numReads) throws RpcThrottlingException
      Description copied from interface: OperationQuota
      Checks 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:
      checkBatchQuota in interface OperationQuota
      Parameters:
      numWrites - number of write operation that will be performed
      numReads - 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: OperationQuota
      Checks if it is possible to execute the scan. The quota will be estimated based on the composition of the scan.
      Specified by:
      checkScanQuota in interface OperationQuota
      Parameters:
      scanRequest - the given scan operation
      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
      Throws:
      RpcThrottlingException - if the operation cannot be performed because RPC quota is exceeded.
    • close

      public void close()
      Description copied from interface: OperationQuota
      Cleanup method on operation completion
      Specified by:
      close in interface OperationQuota
    • addGetResult

      public void addGetResult(Result result)
      Description copied from interface: OperationQuota
      Add a get result. This will be used to calculate the exact quota and have a better short-read average size for the next time.
      Specified by:
      addGetResult in interface OperationQuota
    • addScanResult

      public void addScanResult(List<Result> results)
      Description copied from interface: OperationQuota
      Add a scan result. This will be used to calculate the exact quota and have a better long-read average size for the next time.
      Specified by:
      addScanResult in interface OperationQuota
    • addMutation

      public void addMutation(Mutation mutation)
      Description copied from interface: OperationQuota
      Add a mutation result. This will be used to calculate the exact quota and have a better mutation average size for the next time.
      Specified by:
      addMutation in interface OperationQuota
    • getReadAvailable

      public long getReadAvailable()
      Description copied from interface: OperationQuota
      Returns the number of bytes available to read to avoid exceeding the quota
      Specified by:
      getReadAvailable in interface OperationQuota
    • getReadConsumed

      public long getReadConsumed()
      Description copied from interface: OperationQuota
      Returns the number of bytes consumed from the quota by the operation
      Specified by:
      getReadConsumed in interface OperationQuota