You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Andrew Purtell (JIRA)" <ji...@apache.org> on 2017/09/29 23:51:03 UTC
[jira] [Commented] (HBASE-18906) Investigate Phoenix usages of
Region#waitForXXX APIs
[ https://issues.apache.org/jira/browse/HBASE-18906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16186705#comment-16186705 ]
Andrew Purtell commented on HBASE-18906:
----------------------------------------
Phoenix doesn't use these APIs, but they should. Instead they are doing this terrible thing: https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/UngroupedAggregateRegionObserver.java#L236
I think we should consider providing APIs for the following:
- Request flush async
- Request compaction async
- Poll for the completion of a single flush request
- Poll for the completion of a single compaction request
- Wait for all pending flushes to complete on the region
- Wait for all pending compactions to finish on the region
It's a good idea to get away from providing access to low level implementation details. However I think it would be good to allow coprocessors to wrap the behaviors. One example: guarantee persistence in HFiles: write some data, trigger a flush (API needed), wait for flushes to complete (API needed), then do more stuff. Another example: secure delete: lay some delete markers, trigger flushing and compactions (APIs needed), wait for the activity to complete (API needed), then do more stuff.
> Investigate Phoenix usages of Region#waitForXXX APIs
> ----------------------------------------------------
>
> Key: HBASE-18906
> URL: https://issues.apache.org/jira/browse/HBASE-18906
> Project: HBase
> Issue Type: Sub-task
> Components: Coprocessors
> Reporter: Anoop Sam John
> Assignee: Anoop Sam John
> Fix For: 2.0.0-alpha-4
>
>
> While reviewing HBASE-18183, Andy pointed out that Phoenix uses waitForFlushesAndCompactions and/or waitForFlushes for diff reasons. This issue is to see why they need them and whether alternate ways are possible. This seems to be too much internal stuff and a normal CP hook calling these would be dangerous.
> If there are alternate ways for Phoenix not to use this and not landing in issues (As said by Andy) we should suggest/fix for them.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)