hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Corgan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7897) Add support for tags to Cell Interface
Date Sun, 05 May 2013 01:19:13 GMT

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

Matt Corgan commented on HBASE-7897:

Regarding the hasTags() method, I would suggest leaving it out since it is only a convenience
method (getNumTags() > 0) that will force every implementation to have duplicate code.
 Would be better if callers did CellUtil.hasTags(cell).  See http://martinfowler.com/bliki/MinimalInterface.html.

{quote}If we added hasTags, Map getTags, and byte [] getTag(byte [] tagName){quote}I'm worried
about adding methods that require object creation.  Map getTags() and byte[] getTag would
be very expensive if used in a long scan where most cells are filtered out.  They'd be equivalent
to supporting methods like byte[] getRowKey().  Ideally, these expensive little objects would
only be spawned when needed, and might never really be needed in standalone form if the result
is being re-encoded to go to the client.

If we want to support different tag encodings, then perhaps add an "int getTagEncoding()"
method that callers could use to determine how to parse the bytes identified by getTagsArray()/getTagsOffset()/getTagsLength().

In fact, if there are multiple encodings, we may want to leave the getNumTags() method out
as well.  If getTagsLength()==0, there are no tags, and if getTagsLength()>0, it's up to
the decoder to determine the number of tags.
> Add support for tags to Cell Interface
> --------------------------------------
>                 Key: HBASE-7897
>                 URL: https://issues.apache.org/jira/browse/HBASE-7897
>             Project: HBase
>          Issue Type: Task
>            Reporter: stack
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Critical
>             Fix For: 0.95.1
>         Attachments: HBASE-7897.patch
> Cell Interface has suppport for mvcc.   The only thing we'd add to Cell in the near future
is support for tags it would seem.  Should be easy to add.  Should add it now.  See backing
discussion here: https://issues.apache.org/jira/browse/HBASE-7233?focusedCommentId=13573784&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13573784
> Matt outlines what the additions to Cell might look like here:
> https://issues.apache.org/jira/browse/HBASE-7233?focusedCommentId=13531619&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13531619
> Would be good to get these in now.
> Marking as 0.96.  Can more later.

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

View raw message