[
https://issues.apache.org/jira/browse/HBASE-16405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15422299#comment-15422299
]
ramkrishna.s.vasudevan commented on HBASE-16405:
------------------------------------------------
Things looks good.
Actually my intention was to say in CompoundBloomFilter#contains(Cell, ByteBuff)
{code}
int block = index.rootBlockContainingKey(keyCell);
// This copy will be needed. Because blooms work on the key part only.
// Atleast we now avoid multiple copies until it comes here. If we want to
make this to work
// with BBs then the Hash.java APIs should also be changed to work with BBs.
if (keyCell instanceof KeyValue) {
// TODO : directly use Cell here
return checkContains(((KeyValue) keyCell).getBuffer(), ((KeyValue)
keyCell).getKeyOffset(),
((KeyValue) keyCell).getKeyLength(), block);
}
// TODO : Avoid this copy in read path also
byte[] key = CellUtil.getCellKeySerializedAsKeyValueKey(keyCell);
{code}
remove the above TODO. So there is no longer any need for ByteArrayHashKey. So
the HashKey will just have two hierarchy Row and RowColHashKey and you can
remove the generic itself and make it work with Cells alone. And if needed
modify the test cases. If suppose removing it is totally impossible just for
the case of test case then leave the ByteArrayHashKey for test purpose alone
and in that case the hierarchy will be as is.
> Remove byte[] based hash() APIs.
> --------------------------------
>
> Key: HBASE-16405
> URL: https://issues.apache.org/jira/browse/HBASE-16405
> Project: HBase
> Issue Type: Sub-task
> Components: Compaction
> Reporter: ramkrishna.s.vasudevan
> Assignee: Anoop Sam John
> Fix For: 2.0.0
>
> Attachments: HBASE-16405.patch
>
>
> Currently the read path though it works with Cells, still does go with the
> assumption that we need to copy the Cells to KeyValue's key format and then
> use the byte[] version of hash() function to calculate the Bloom hash. In
> case of incoming cell's being KeyValue type we try to use the
> KeyValue.getKey(), KeyValue.getKeyOffset() APIs. With this sub-task we will
> get rid of all those and things will work with Cells.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)