[ 
https://issues.apache.org/jira/browse/HBASE-19924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16454919#comment-16454919
 ] 

Hudson commented on HBASE-19924:
--------------------------------

SUCCESS: Integrated in Jenkins build HBase-1.3-IT #400 (See 
[https://builds.apache.org/job/HBase-1.3-IT/400/])
HBASE-19924 hbase rpc throttling does not work for multi() with request 
(apurtell: rev 62a3434b9bb849395b45e90cf17f56a74eb96c00)
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/TimeBasedLimiter.java
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/NoopQuotaLimiter.java
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/QuotaLimiter.java
* (edit) 
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaState.java
* (edit) 
hbase-server/src/main/java/org/apache/hadoop/hbase/quotas/DefaultOperationQuota.java


> hbase rpc throttling does not work for multi() with request count rater.
> ------------------------------------------------------------------------
>
>                 Key: HBASE-19924
>                 URL: https://issues.apache.org/jira/browse/HBASE-19924
>             Project: HBase
>          Issue Type: Bug
>          Components: rpc
>    Affects Versions: 0.16.0, 1.2.6
>            Reporter: huaxiang sun
>            Assignee: huaxiang sun
>            Priority: Major
>             Fix For: 1.5.0, 1.2.7, 1.3.3, 2.0.0, 1.4.5
>
>         Attachments: HBASE-19924-branch-1-v001.patch, 
> HBASE-19924-master-v001.patch, HBASE-19924-master-v002.patch, 
> HBASE-19924-master-v002.patch, HBASE-19924-master-v002.patch, 
> HBASE-19924-master-v002.patch
>
>
> 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.
> {code:java}
> @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);
>   }
> }{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to