@Override
  public void close() {
    // Adjust the quota consumed for the specified operation
    writeDiff = operationSize[OperationType.MUTATE.ordinal()] - writeConsumed;

    long resultSize =
      operationSize[OperationType.GET.ordinal()] + operationSize[OperationType.SCAN.ordinal()];
    if (useResultSizeBytes) {
      readDiff = resultSize - readConsumed;
    } else {
      long blockBytesScanned =
        RpcServer.getCurrentCall().map(RpcCall::getBlockBytesScanned).orElse(0L);
      readDiff = Math.max(blockBytesScanned, resultSize) - readConsumed;
    }
    writeCapacityUnitDiff =
      calculateWriteCapacityUnitDiff(operationSize[OperationType.MUTATE.ordinal()], writeConsumed);
    readCapacityUnitDiff = calculateReadCapacityUnitDiff(
      operationSize[OperationType.GET.ordinal()] + operationSize[OperationType.SCAN.ordinal()],
      readConsumed);
    handlerUsageTimeDiff = calculateHandlerUsageMsDiff();

    for (final QuotaLimiter limiter : limiters) {
      if (writeDiff != 0) {
        limiter.consumeWrite(writeDiff, writeCapacityUnitDiff, isAtomic);
      }
      if (readDiff != 0) {
        limiter.consumeRead(readDiff, readCapacityUnitDiff, isAtomic);
      }
      if (handlerUsageTimeDiff != 0) {
        limiter.consumeTime(handlerUsageTimeDiff);
      }
    }
  }
NOTE: The order matters. It should be something like [user, table, namespace, global]
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/DefaultOperationQuota.java