hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Yang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-15921) Add first AsyncTable impl and create TableImpl based on it
Date Tue, 20 Sep 2016 08:11:21 GMT

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

Phil Yang commented on HBASE-15921:

As for 'async scan', i have not think about it carefully, maybe return one Future Object for
each call "next()" ?
Talked with [~Apache9], we may have these options:
1: Use callback, when a Result is ready we run the callback provided by the user. But if we
run the callback in the main loop, the callback must be simple. If users need complex logic,
they must put the Result into their own thread(pool). And we may guarantee if the previous
callback is not done, we can not run next row's callback.(It is simple if we have only one
2: Like you said, for each next() we return a CompletableFuture. The first future is the first
Result, the second is the second... We should keep the order if user call next for many times
at first.
3: We return a future when the scanner init. And each time we get the Result from future,
we also return a new CompletableFuture belonging to the next Result.

> Add first AsyncTable impl and create TableImpl based on it
> ----------------------------------------------------------
>                 Key: HBASE-15921
>                 URL: https://issues.apache.org/jira/browse/HBASE-15921
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Jurriaan Mous
>            Assignee: Jurriaan Mous
>         Attachments: HBASE-15921.patch, HBASE-15921.v1.patch
> First we create an AsyncTable interface with implementation without the Scan functionality.
Those will land in a separate patch since they need a refactor of existing scans.
> Also added is a new TableImpl to replace HTable. It uses the AsyncTableImpl internally
and should be a bit faster because it does jump through less hoops to do ProtoBuf transportation.
This way we can run all existing tests on the AsyncTableImpl to guarantee its quality.

This message was sent by Atlassian JIRA

View raw message