6.8.  Keeping Deleted Cells

By default, delete markers extend back to the beginning of time. Therefore, Get or Scan operations will not see a deleted cell (row or column), even when the Get or Scan operation indicates a time range before the delete marker was placed.

ColumnFamilies can optionally keep deleted cells. In this case, deleted cells can still be retrieved, as long as these operations specify a time range that ends before the timestamp of any delete that would affect the cells. This allows for point-in-time queries even in the presence of deletes.

Deleted cells are still subject to TTL and there will never be more than "maximum number of versions" deleted cells. A new "raw" scan options returns all deleted rows and the delete markers.

Example 6.3. Change the Value of KEEP_DELETED_CELLS Using HBase Shell

hbase> hbase> alter ‘t1′, NAME => ‘f1′, KEEP_DELETED_CELLS => true

Example 6.4. Change the Value of KEEP_DELETED_CELLS Using the API

...
HColumnDescriptor.setKeepDeletedCells(true);
...
      

See the API documentation for KEEP_DELETED_CELLS for more information.

comments powered by Disqus