You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jonathan Hsieh (JIRA)" <ji...@apache.org> on 2013/08/19 11:03:53 UTC
[jira] [Commented] (HBASE-9247) Cleanup Key/KV/Meta/MetaKey
Comparators
[ https://issues.apache.org/jira/browse/HBASE-9247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13743652#comment-13743652 ]
Jonathan Hsieh commented on HBASE-9247:
---------------------------------------
This is like pulling a string that keeps unraveling more. This will likely end up looking like a drastic change but I think it is necessary to simplify the code.
My goal is to:
* Simplify KVComparator+KeyComparator/MetaComparator+MetaKeyComparator down to KVComparator and MetaComparator.
First I did this -- (minor api semantics change):
* Fixed defaults in HFile.Writer factory to default to Key-format-aware comparator (KeyComparator, later converted to KVComparator) instead of a Key-format oblivious byte[] comparator. (Essentially all instances require specifying KEY_COMPARATOR -- why not just make it the default).
** Found that TestSeekTo, TestReseekTo and a handful of others depend on a different comparator because -- HBASE-7845 "breaks" these tests.
* Moved getComparator into TableName. (removed an instanceof bad smell)
I've also working on these which will change API type signatures:
* Convert of RawComparator<byte[]> -> RawComparator<Cell> (seems like incorrect use of generics)
* .. (more to come.)
Some questions: Why is the Comparator serialized into part of the HFile? Beyond Meta Key and a normal Key, is there external uses of his that I'm not aware of that I may break? (Phoenix?)
> Cleanup Key/KV/Meta/MetaKey Comparators
> ---------------------------------------
>
> Key: HBASE-9247
> URL: https://issues.apache.org/jira/browse/HBASE-9247
> Project: HBase
> Issue Type: Sub-task
> Reporter: Jonathan Hsieh
> Assignee: Jonathan Hsieh
>
> HBASE-9164 converted KVComparator's KeyCompare#compare guts from one that assumed a contiguous array backing a KV to one that used the Cell interface which doesn't have this assumption.
> There is now duplicate code that should be cleaned up.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira