Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-19826

Provide a option to see rows behind a delete in a time range queries

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • None
    • None

    Description

      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

      
      	    @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()));
      	    }
      
      

      Another way is to provide a way to set KEEP_DELETED_CELLS to true in ScanOptions of preStoreScannerOpen.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ankit@apache.org Ankit Singhal Assign to me
            ankit@apache.org Ankit Singhal
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment