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

stack commented on HBASE-7845:
------------------------------

Interesting optimization.  I like it.

There is a 
./hbase-server/src/test/java/org/apache/hadoop/hbase/HFilePerformanceEvaluation.java
  Can you use this to show better numbers using your index key?

Why these changes?

-    KeyValue rowB = new 
KeyValue(Bytes.toBytes("testtable,www.hbase.org/%20,99999"),
+    KeyValue row2 = new 
KeyValue(Bytes.toBytes("testtable,www.hbase.org/%20,99999"),

or these


-      kvs = getData(FAMILY, "row", Arrays.asList("col2", "col3"), 3);
+      kvs = getData(FAMILY, "row", Arrays.asList("col2", "col3"), 2);

How is this happening?

-      // Expected block reads: 2. [HBASE-4443]
-      kvs = getData(FAMILY, "row", Arrays.asList("col5"), 2);
+      // Expected block reads: 1. [HBASE-4443]&[HBASE-7845]
+      kvs = getData(FAMILY, "row", Arrays.asList("col5"), 1);

What is this

 
+    @Override
+    public byte[] getFakedKey(final byte[] leftKey, final byte[] rightKey) {
+      return Arrays.copyOf(rightKey, rightKey.length);
+    }

It doesn't look right.

What Ted said regards opaque looking code like the below:

+            return -2; // using faked index key


Thanks Liang
                
> optimize hfile index key
> ------------------------
>
>                 Key: HBASE-7845
>                 URL: https://issues.apache.org/jira/browse/HBASE-7845
>             Project: HBase
>          Issue Type: Improvement
>          Components: HFile
>    Affects Versions: 0.96.0
>            Reporter: Liang Xie
>            Assignee: Liang Xie
>             Fix For: 0.98.0
>
>         Attachments: HBASE-7845.txt, HBASE-7845-v2.txt, HBASE-7845-v3.txt, 
> HBASE-7845-v4.txt, HBASE-7845-v5.txt, HBASE-7845-v6.txt
>
>
> Leveldb uses ByteWiseComparatorImpl::FindShortestSeparator() & 
> FindShortSuccessor() to reduce index key size, it would be helpful under 
> special conditions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to