phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-4232) Hide shadow cell and commit table access in TAL
Date Thu, 28 Sep 2017 17:44:01 GMT

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

James Taylor commented on PHOENIX-4232:
---------------------------------------

I think a filter would work fine for the case where the shadow cells already exist. However,
it won't work for the case in which you need to lookup in the commit table because you won't
have the state you need to create a scanner. You could have your own coprocessor that hides
this, though. The downside of this is that it won't work with our snapshot reads since coprocessors
aren't invoked in this case.

For Phoenix, the best solution would be to:
- Create a RegionScanner which is the first one in the chain that hides the shadow cell interaction.
- Ensure the shadow cell qualifier is projected in the scan from the client side. This can
be done through a new TAL method called from BaseResultIterators.initializeScan(). Also, somewhat
unrelated, but make sure the time range is setup correctly on the client side. Tephra does
this through a coprocessor, but it'd be fine to do it on the client side instead.

> Hide shadow cell and commit table access in TAL
> -----------------------------------------------
>
>                 Key: PHOENIX-4232
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4232
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>              Labels: omid
>
> Omid needs to project the shadow cell column qualifier and then based on the value, filter
the row. If the shadow cell is not found, it needs to perform a lookup in the commit table
(the source of truth) to get the information instead. For the Phoenix integration, there are
likely two TAL methods that can be added to handle this:
> # Add method call to new TAL method in preScannerOpen call on coprocessor that projects
the shadow cell qualifiers and sets the time range. This is equivalent to the TransactionProcessor.preScannerOpen
that Tephra does. It's possible this work could be done on the client side as well, but it's
more likely that the stuff that Phoenix does may override this (but we could get it to work
if need be).
> # Add TAL method that returns a RegionScanner to abstract out the filtering of the row
(potentially querying commit table). This RegionScanner would be added as the first in the
chain in the NonAggregateRegionScannerFactory.getRegionScanner() API.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message