hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-12358) Create ByteBuffer backed Cell
Date Fri, 31 Oct 2014 18:04:34 GMT

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

stack commented on HBASE-12358:
-------------------------------

As a POC, v2 looks cleaner.

What is ByteBufferBackedKeyValue then?  An old-school KeyValue only backed by BB?  Thats a
good POC exercise I'd say.

You don't need HeapSize and Settable... because ByteBufferBackedCell implements them already:

+public class ByteBufferBackedKeyValue implements ByteBufferBackedCell, HeapSize, Cloneable,
+    SettableSequenceId {

Don't repeat these defines in new class I'd say... just refer to them from KeyValue?

+  /** Size of the key length field in bytes */
+  public static final int KEY_LENGTH_SIZE = Bytes.SIZEOF_INT;

Or if you do bring them over, make them private so this madness (smile) doesn't leak about.

On below, you can actually instantiate an empty one?

+  public ByteBufferBackedKeyValue() {
+
+  }


We can't have a util per type as in ByteBufferBackedKeyValueUtil

Could we have single util and it uses factory to get type particular methods?  Can do later.

What you fellas think of adding this?

+  public boolean hasArray() {

Does it belong in Cell?  I mean, if it returns false, what are you to do?  Go find BB version?
 Where you find that?  A factory can be used to figure the configured type inside server/client
but as to whether or not we should use BBs rather than arrays... This is one way adding it
to Cell but if DBBs, what you to do?

On other hand, we are not going to have that many implementations of Cell... so if Cell answer
false, then you presume it has implemented BBBCell... and use the BB methods.  SOmething like
that.


> Create ByteBuffer backed Cell
> -----------------------------
>
>                 Key: HBASE-12358
>                 URL: https://issues.apache.org/jira/browse/HBASE-12358
>             Project: HBase
>          Issue Type: Sub-task
>          Components: regionserver, Scanners
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-12358.patch, HBASE-12358_1.patch, HBASE-12358_2.patch
>
>
> As part of HBASE-12224 and HBASE-12282 we wanted a Cell that is backed by BB.  Changing
the core Cell impl would not be needed as it is used in server only.  So we will create a
BB backed Cell and use it in the Server side read path. This JIRA just creates an interface
that extends Cell and adds the needed API.
> The getTimeStamp and getTypebyte() can still refer to the original Cell API only.  The
getXXxOffset() and getXXXLength() can also refer to the original Cell only.



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

Mime
View raw message