hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ankit Singhal (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-19826) Provide a option to see rows behind a delete in a time range queries
Date Tue, 30 Jan 2018 12:08:00 GMT

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

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

{quote}I do not think it is a good idea to give users the ability to access the table by themselves
and still expect correct result.

 Anyway, I think changing keep delete cells in cp hook is acceptable, but please do not introduce
new option to Scan since it is a user API. The max versions and filter almost kill us since
the behavior is really strange...
{quote}
Ok, we can leave adding "seePastDeleteMarkers" option in a scan.
{quote}You can try using attribute to carry some Phoenix only logic...
{quote}
 

Yep, we can just leverage pre-hooks to make it work for our use-cases.

 
{quote}BTW, will JDBC become the first choice when using Phoenix?
{quote}
JDBC is always the first choice when using Phoenix but some people are writing the table
using HBase API and querying through Phoenix till they migrate their legacy application.

 

Thank you so much, [~Apache9] for the time and review.

 

> 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)

Mime
View raw message