[
https://issues.apache.org/jira/browse/HBASE-18978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16250637#comment-16250637
]
Appy commented on HBASE-18978:
------------------------------
bq. 'RawXXX' will execute the callbacks directly in the rpc framework thread,
so it is a little dangerous for non-expert users as if you execute
time-consuming tasks in the callback, the hbase client may be stuck. For the
non-raw implementation, usually it is just a simple wrapper of the raw
implementation. The difference is that, you need to provide a thread pool to
execute the callbacks, so it will not block the rpc framework thread, which is
safer for users.
Okay, so if that's what 'raw' means, it totally makes sense. Like you have for
admin - One interface and two implementations, one with separate threadpool and
another with same thread pool (raw).
AsyncAdmin <--- AsyncHBaseAdmin
AsyncAdmin <--- RawAsyncHBaseAdmin
That's clean and nice.
bq. And for AsyncTable and RawAsyncTable, the scan API is a bit different. For
RawAsyncTable there is a very low level observer style API. All other scan
methods of async client are based on this API. It is not easy to write correct
code with this API and I believe for most cases users do not need to use this
method.
This conflicts with above understanding of 'raw'. Going by previous meaning,
there shouldn't be any 'raw' interfaces since that an implementation thing.
Seems like 'raw' is being used for many things and that where the confusion
arises.
Can we either
1) Rename RawAsyncTable to something else, say, AdvancedAsyncTable,
ExtendedAsyncTable or something else. Additionally, such advanced interface
should extend basic interface for ease of use so that users using advanced one
don't have to keep track of two interfaces/variables.
OR
2) Merge it into AsyncTable: My personal preference, mainly because we
shouldn't separate interfaces because 2 functions are "difficult to use" or
less used. As long as we comment them properly, no dev will have trouble
using/avoiding them, as appropriate.
Thanks for the explanations Duo. What do you say about last point?
> Align the methods in Table and AsyncTable
> -----------------------------------------
>
> Key: HBASE-18978
> URL: https://issues.apache.org/jira/browse/HBASE-18978
> Project: HBase
> Issue Type: Task
> Components: asyncclient, Client
> Reporter: Duo Zhang
> Assignee: Peter Somogyi
> Priority: Critical
> Fix For: 2.0.0-beta-1
>
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)