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

ramkrishna.s.vasudevan commented on HBASE-11874:
------------------------------------------------

findCommonPrefixInFlatKey - would need seperate test cases. 
{code}
+    short rLen = cell.getRowLength();
+    if (commonPrefix < rLen + KeyValue.ROW_LENGTH_SIZE) {
+      // Previous and current rows are different. Copy the differing part of
+      // the row, skip the column family, and copy the qualifier.
+      CellUtil.writeRowKeyPart(cell, rLen, commonPrefix, out);
+      out.write(cell.getQualifierArray(), cell.getQualifierOffset(), 
cell.getQualifierLength());
{code}
{code}
+      // The common part includes the whole row. As the column family is the
+      // same across the whole file, it will automatically be included in the
+      // common prefix, so we need not special-case it here.
+      // What we write here is the non common part of the qualifier
+      int commonQualPrefix = commonPrefix - (rLen + KeyValue.ROW_LENGTH_SIZE)
+          - (cell.getFamilyLength() + KeyValue.FAMILY_LENGTH_SIZE);
+      out.write(cell.getQualifierArray(), cell.getQualifierOffset() + 
commonQualPrefix,
+          cell.getQualifierLength() - commonQualPrefix);
{code}
These two comments are bit contradictory.  In the if condition we say we are 
skipping the cf but in else we are saying we have already included the family. 

> Support Cell to be passed to StoreFile.Writer rather than KeyValue
> ------------------------------------------------------------------
>
>                 Key: HBASE-11874
>                 URL: https://issues.apache.org/jira/browse/HBASE-11874
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>             Fix For: 0.99.0, 2.0.0
>
>         Attachments: HBASE-11874.patch, HBASE-11874_V2.patch, 
> HBASE-11874_V3.patch, HBASE-11874_V3.patch, HBASE-11874_V4.patch, 
> HBASE-11874_V5.patch
>
>
> This is the in write path and touches StoreFile.Writer,  HFileWriter , 
> HFileDataBlockEncoder and different DataBlockEncoder impl.
> We will have to avoid KV#getBuffer() KV#getKeyOffset/Length() calls.



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

Reply via email to