[
https://issues.apache.org/jira/browse/HBASE-13510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14546876#comment-14546876
]
stack commented on HBASE-13510:
-------------------------------
This last patch looks much better. Below are some nits.. One question too...
If answer to all below is just cleanup, I'd say go ahead and fix on commit.
Can't this Interface addition be Cell instead of KeyValue?
86 boolean contains(KeyValue kvKey, ByteBuffer bloom);
What is this about:
public static final int VERSION = 1;
It does not look like it is used?
Or this...
204 // In a version 1 HFile Bloom filter data is stored in a separate
meta
205 // block which is loaded on demand, but in version 2 it is
pre-loaded.
206 // We want to use the same API in both cases.
Can be removed?
Will we be moving off the below?
202 public boolean contains(byte[] buf, int offset, int length,
ByteBuffer theBloom) {
... and on to a Cell version.. then inside in the method we figure if kv,
onheap/offheap? Can do later.
Minor, in util says:
162 * Creates a Bloom filter of the given size.
but it is returning a chunk. Instead of createBySize should it be
createByteBloomChunkBySize
Nit... add @visiblefortests annotation along w/ this:
/** Should only be used in tests */
> 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, HBASE-13510_5.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)