hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duo Zhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-16838) Implement basic scan
Date Fri, 11 Nov 2016 06:16:59 GMT

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

Duo Zhang commented on HBASE-16838:

Is a Scan always against a Region (is the Region redundant?).
A scan can cross regions, the AsyncScanRegionRpcRetryingCaller is only used to scan one region.
During a scan we may create many AsyncScanRegionRpcRetryingCallers. AsyncScanOneRegionRpcRetryingCaller
maybe better?

Looking at the Response, we need Scan in there? The Scan in Response is different from originalScan?
They are the same. But I think it is a little confusing that we use the originalScan in AsyncClientScanner
but modify it at another place. But anyway, we do change it so people can not use it as 'original'...
Let me add some javadoc here...

I think you should stick the above comment on the scan timeout so it is clear what the scan
timeout means. It helps.
I've add some comments in AsyncConnectionConfiguration. Let me add the above comments too.

Is there example code on how I'd do an async Scan? I create a ScanConsumer and pass it in
then it will get called with Results as the Scan progresses? The AsyncTable#scan returns immediately?
Perhaps stick it in javadoc for the scan method? Is SimpleScanObserver a good example or just
a stop gap with its queue?
I plan to introduce a example when implementing getScanner, where I plan to add flow control
support. This method is used to write high performance event-driven program so it is not very
user friendly... [~carp84] also claimed that even for other method such as get and put, complete
the CompletableFuture insdie the thread of the rpc framework is not safe as user may also
do time consuming work when consuming the CompletableFuture. Maybe we need a new 'SafeAsyncTable'
interface? Or change the name of this interface to 'RawAsyncTable' or 'UnsafeAsyncTable'?
As the async client is still marked as Unstable, I think we can do this in a follow on issue.

Dont kill me but should ScanConsumer be ScanResultConsumer (can do in followup if makes sense)
or just ScanResult?
I think it should be ScanResultConsumer as I've already introduce a 'ScanResultCache'(What's
wrong with my brain...)

CompleteResultScanResultCache should be CompleteScanResultCache to match AllowPartialScanResultCache?

Fine. Will change.

> Implement basic scan
> --------------------
>                 Key: HBASE-16838
>                 URL: https://issues.apache.org/jira/browse/HBASE-16838
>             Project: HBase
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0
>            Reporter: Duo Zhang
>            Assignee: Duo Zhang
>             Fix For: 2.0.0
>         Attachments: HBASE-16838-v1.patch, HBASE-16838-v2.patch, HBASE-16838-v3.patch,
> Implement a scan works like the grpc streaming call that all returned results will be
passed to a ScanConsumer. The methods of the consumer will be called directly in the rpc framework
threads so it is not allowed to do time consuming work in the methods. So in general only
experts or the implementation of other methods in AsyncTable can call this method directly,
that's why I call it 'basic scan'.

This message was sent by Atlassian JIRA

View raw message