Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-19924

hbase rpc throttling does not work for multi() with request count rater.

    XMLWordPrintableJSON

    Details

      Description

      Basically, rpc throttling does not work for request count based rater for multi. for the following code, when it calls limiter's checkQuota(), numWrites/numReads is lost.

      
      @Override
      public void checkQuota(int numWrites, int numReads, int numScans) throws ThrottlingException {
        writeConsumed = estimateConsume(OperationType.MUTATE, numWrites, 100);
        readConsumed = estimateConsume(OperationType.GET, numReads, 100);
        readConsumed += estimateConsume(OperationType.SCAN, numScans, 1000);
      
        writeAvailable = Long.MAX_VALUE;
        readAvailable = Long.MAX_VALUE;
        for (final QuotaLimiter limiter : limiters) {
          if (limiter.isBypass()) continue;
      
          limiter.checkQuota(writeConsumed, readConsumed);
          readAvailable = Math.min(readAvailable, limiter.getReadAvailable());
          writeAvailable = Math.min(writeAvailable, limiter.getWriteAvailable());
        }
      
        for (final QuotaLimiter limiter : limiters) {
          limiter.grabQuota(writeConsumed, readConsumed);
        }
      }

        Attachments

        1. HBASE-19924-branch-1-v001.patch
          10 kB
          Hua Xiang
        2. HBASE-19924-master-v001.patch
          10 kB
          Hua Xiang
        3. HBASE-19924-master-v002.patch
          10 kB
          Hua Xiang
        4. HBASE-19924-master-v002.patch
          10 kB
          Michael Stack
        5. HBASE-19924-master-v002.patch
          10 kB
          Hua Xiang
        6. HBASE-19924-master-v002.patch
          10 kB
          Hua Xiang

          Issue Links

            Activity

              People

              • Assignee:
                huaxiang Hua Xiang
                Reporter:
                huaxiang Hua Xiang
              • Votes:
                0 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: