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

Ted Yu commented on HBASE-12298:
--------------------------------

{code}
+   * Search sorted array "a" for byte "key". I can't remember if I wrote this 
or
+   * copied it from somewhere. (mcorgan)
{code}
Drop the second sentence.
The parameter name and its explanation should be on the same line.
{code}
+  private static class OnheapPrefixTreeCell implements Cell, 
SettableSequenceId, HeapSize {
{code}
nit: Ohheap -> OnHeap
{code}
     valueLength = currentRowNode.getValueLength(currentCellIndex, blockMeta);
+    this.block.asSubByteBuffer(this.absoluteValueOffset, valueLength, pair);
{code}
What's the effect of the asSubByteBuffer() call ?
{code}
-  public byte[] getTreeBytes() {
+  public ByteBuff getTreeBytes() {
{code}
I searched codebase but didn't see the above method called. We can drop it. 
Otherwise rename the method: it no longer returns byte array.
{code}
+      // Just in case getValueArray is called on offheap BB
+      byte[] val = new byte[valueLength];
{code}
Do we need to allocate new byte array every time getValueArray() is called ?
For UFIntTool.java,
{code}
+  public static long fromBytes(final ByteBuff buf, final int offset, final int 
width) {
{code}
Where is the above method called ?

> Support BB usage in PrefixTree
> ------------------------------
>
>                 Key: HBASE-12298
>                 URL: https://issues.apache.org/jira/browse/HBASE-12298
>             Project: HBase
>          Issue Type: Sub-task
>          Components: regionserver, Scanners
>            Reporter: Anoop Sam John
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-12298.patch, HBASE-12298_1.patch, 
> HBASE-12298_2.patch, HBASE-12298_3.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to