hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-17331) Avoid busy waiting in ThrottledInputStream
Date Sun, 18 Dec 2016 19:39:58 GMT

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

Hudson commented on HBASE-17331:
--------------------------------

FAILURE: Integrated in Jenkins build HBase-Trunk_matrix #2155 (See [https://builds.apache.org/job/HBase-Trunk_matrix/2155/])
HBASE-17331 Avoid busy waiting in ThrottledInputStream (ChiaPing Tsai) (tedyu: rev 665fe3eef17a96da037901cba776880d0499a9c1)
* (edit) hbase-common/src/main/java/org/apache/hadoop/hbase/io/hadoopbackport/ThrottledInputStream.java
* (add) hbase-common/src/test/java/org/apache/hadoop/hbase/io/hadoopbackport/TestThrottledInputStream.java
* (edit) hbase-server/src/main/java/org/apache/hadoop/hbase/SplitLogTask.java


> Avoid busy waiting in ThrottledInputStream
> ------------------------------------------
>
>                 Key: HBASE-17331
>                 URL: https://issues.apache.org/jira/browse/HBASE-17331
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 2.0.0
>            Reporter: ChiaPing Tsai
>            Assignee: ChiaPing Tsai
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: HBASE-17331.v0.patch, HBASE-17331.v1.patch, HBASE-17331.v2.patch,
HBASE-17331.v2.patch
>
>
> {code:title=ThrottledInputStream.java|borderStyle=solid}
> // We can calculate the precise sleep time instead of busy waiting
>   private void throttle() throws IOException {
>     while (getBytesPerSec() > maxBytesPerSec) {
>       try {
>         Thread.sleep(SLEEP_DURATION_MS);
>         totalSleepTime += SLEEP_DURATION_MS;
>       } catch (InterruptedException e) {
>         throw new IOException("Thread aborted", e);
>       }
>     }
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message