HBASE-9005 Improve documentation around KEEP_DELETED_CELLS, time range scans, and delete markers

This commit is contained in:
Misty Stanley-Jones 2014-10-02 09:21:58 +10:00
parent b9701d0569
commit baaaac0202
1 changed files with 22 additions and 8 deletions

View File

@ -513,20 +513,34 @@ public static byte[][] getHexSplits(String startKey, String endKey, int numRegio
<section <section
xml:id="cf.keep.deleted"> xml:id="cf.keep.deleted">
<title> Keeping Deleted Cells </title> <title> Keeping Deleted Cells </title>
<para>ColumnFamilies can optionally keep deleted cells. That means deleted cells can still be <para>By default, delete markers extend back to the beginning of time. Therefore, <link
retrieved with <link
xlink:href="http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Get.html">Get</link> xlink:href="http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Get.html">Get</link>
or <link or <link
xlink:href="http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Scan.html">Scan</link> xlink:href="http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/client/Scan.html">Scan</link>
operations, as long these operations have a time range specified that ends before the operations will not see a deleted cell (row or column), even when the Get or Scan operation
timestamp of any delete that would affect the cells. This allows for point in time queries indicates a time range
even in the presence of deletes. </para> before the delete marker was placed.</para>
<para>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. </para>
<para> Deleted cells are still subject to TTL and there will never be more than "maximum number <para> 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 of versions" deleted cells. A new "raw" scan options returns all deleted rows and the delete
markers. </para> markers. </para>
<para>See <link <example>
xlink:href="http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/HColumnDescriptor.html">HColumnDescriptor</link> <title>Change the Value of <code>KEEP_DELETED_CELLS</code> Using HBase Shell</title>
for more information. </para> <screen>hbase> hbase> alter t1, NAME => f1, KEEP_DELETED_CELLS => true</screen>
</example>
<example>
<title>Change the Value of <code>KEEP_DELETED_CELLS</code> Using the API</title>
<programlisting language="java">...
HColumnDescriptor.setKeepDeletedCells(true);
...
</programlisting>
</example>
<para>See the API documentation for <link
xlink:href="http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/HColumnDescriptor.html#KEEP_DELETED_CELLS"
>KEEP_DELETED_CELLS</link> for more information. </para>
</section> </section>
<section <section
xml:id="secondary.indexes"> xml:id="secondary.indexes">