diff --git src/main/docbkx/schema_design.xml src/main/docbkx/schema_design.xml index b7ef410..13ebc2f 100644 --- src/main/docbkx/schema_design.xml +++ src/main/docbkx/schema_design.xml @@ -199,6 +199,13 @@ COLUMN CELL
Reverse Timestamps + + Reverse Scan API + + HBASE-4811 implements an API to scan a table or a range within a table in reverse, reducing the need to optimize your schema for forward or reverse scanning. This feature is available in HBase 0.98 and later. See for more information. + + + A common problem in database processing is quickly finding the most recent version of a value. A technique using reverse timestamps as a part of the key can help greatly with a special case of this problem. Also found in the HBase chapter of Tom White's book Hadoop: The Definitive Guide (O'Reilly), the technique involves appending (Long.MAX_VALUE - timestamp) to the end of any key, e.g., [key][reverse_timestamp]. @@ -224,7 +231,7 @@ COLUMN CELL
Relationship Between RowKeys and Region Splits If you pre-split your table, it is critical to understand how your rowkey will be distributed across the region boundaries. As an example of why this is important, consider the example of using displayable hex characters as the - lead position of the key (e.g., ""0000000000000000" to "ffffffffffffffff"). Running those key ranges through Bytes.split + lead position of the key (e.g., "0000000000000000" to "ffffffffffffffff"). Running those key ranges through Bytes.split (which is the split strategy used when creating regions in HBaseAdmin.createTable(byte[] startKey, byte[] endKey, numRegions) for 10 regions will generate the following splits... @@ -504,6 +511,12 @@ long bucket = timestamp % numBuckets; Neither approach is wrong, it just depends on what is most appropriate for the situation. + + Reverse Scan API + + HBASE-4811 implements an API to scan a table or a range within a table in reverse, reducing the need to optimize your schema for forward or reverse scanning. This feature is available in HBase 0.98 and later. See for more information. + +
Variangle Length or Fixed Length Rowkeys?