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

Ankit Singhal commented on HBASE-19826:
---------------------------------------

{quote}Could phoenix hide the HBase table to user? So that you are free to set 
KeepDeletedCells.TRUE as user do not know it...
{quote}
Not really, we let the user have full access to the HBase table. We just don't 
want to hardcode KeepDeletedCells.TRUE in the descriptor because of performance 
reason. As all user queries would read the deleted data unnecessary(even after 
compaction) and increase the latency of the scan.

Current use-cases of Phoenix requires it to be set dynamically in user scans or 
in pre-hook. 
 # During compaction, we want to keep deleted cells only if there are lagging 
indexes, which will eventually get build by reading the cells of the data table.
 # While doing Index scrutiny on a live table, time range scan wants to see 
PUTs not eclipsed by newer DELETE markers.(raw scan cannot be utilized here as 
it will give all cells even if we have delete markers within the time range)

 

 

> Provide a option to see rows behind a delete in a time range queries
> --------------------------------------------------------------------
>
>                 Key: HBASE-19826
>                 URL: https://issues.apache.org/jira/browse/HBASE-19826
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Ankit Singhal
>            Assignee: Ankit Singhal
>            Priority: Major
>             Fix For: 2.0.0
>
>
> We can provide an option (something like seePastDeleteMarkers) in a scan to 
> let the user see the versions behind the delete marker even if 
> keepDeletedCells is set to false in the descriptor.
> With the previous version, we workaround the same in preStoreScannerOpen 
> hook. For reference PHOENIX-4277
> {code}
>           @Override
>           public KeyValueScanner preStoreScannerOpen(final 
> ObserverContext<RegionCoprocessorEnvironment> c,
>               final Store store, final Scan scan, final NavigableSet<byte[]> 
> targetCols,
>               final KeyValueScanner s) throws IOException {
>       
>             if (scan.isRaw() || 
> ScanInfoUtil.isKeepDeletedCells(store.getScanInfo()) || 
> scan.getTimeRange().getMax() == HConstants.LATEST_TIMESTAMP || 
> TransactionUtil.isTransactionalTimestamp(scan.getTimeRange().getMax())) {
>               return s;
>             }
>       
>             ScanInfo scanInfo = 
> ScanInfoUtil.cloneScanInfoWithKeepDeletedCells(store.getScanInfo());
>             return new StoreScanner(store, scanInfo, scan, targetCols,
>                 
> c.getEnvironment().getRegion().getReadpoint(scan.getIsolationLevel()));
>           }
> {code}
> Another way is to provide a way to set KEEP_DELETED_CELLS to true in 
> ScanOptions of preStoreScannerOpen.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to