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

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

{code}
bq.+  public boolean contains(KeyValue kvKey, ByteBuffer bloom) {
+    // We try to store the result in this variable so we can update stats for
+    // testing, but when an error happens, we log a message and return.
+    int block = index.rootBlockContainingKey(kvKey);
+    byte[] key = kvKey.getKey();
+    return  checkContains(key, 0, key.length, block);
{code}
Here we need the key part to check hash if it is available. So if I do it as a 
Cell i need to extract the key byte[] from it.  
Hence better to have it as a KV.
bq.Just refer to HConstants.EMPTY_BYTE_ARRAY?
Ya, ok.  
bq.Might be better just avoid this method itself. It will be just one liner 
code u will need (in 2 places)
This is fine I think. I would leave it as a method only for readability.

> Purge ByteBloomFilter
> ---------------------
>
>                 Key: HBASE-13510
>                 URL: https://issues.apache.org/jira/browse/HBASE-13510
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 2.0.0
>
>         Attachments: HBASE-13510_1.patch, HBASE-13510_2.patch, 
> HBASE-13510_3.patch
>
>
> In order to address the comments over in HBASE-10800 related to comparing 
> Cell with a serialized KV's key we had some need for that in Bloom filters.  
> After discussing with Anoop, we found that it may be possible to 
> remove/modify some of the APIs in the BloomFilter interfaces and for doing 
> that we can purge ByteBloomFilter.  
> I read the code and found that ByteBloomFilter was getting used in V1 version 
> only.  Now as it is obsolete we can remove this code and move some of the 
> static APIs in ByteBloomFilter to some other util class or bloom related 
> classes which will help us in refactoring the code too.



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

Reply via email to