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-7233) Remove Writable Interface from KeyValue
Date Sat, 01 Dec 2012 22:17:58 GMT

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

stack commented on HBASE-7233:
------------------------------

There is one in hbase.protos already:


{code}
 28 /**
 27  * The type of the key in a KeyValue.
 26  */
 25 enum KeyType {
 24     MINIMUM = 0;
 23     PUT = 4;
 22 
 21     DELETE = 8;
 20     DELETE_COLUMN = 12;
 19     DELETE_FAMILY = 14;
 18 
 17     // MAXIMUM is used when searching; you look from maximum on down.
 16     MAXIMUM = 255;
 15 }
 14 
 13 /**
 12  * Protocol buffer version of KeyValue.
 11  * It doesn't have those transient parameters
 10  */
  9 message KeyValue {
  8   required bytes row = 1;
  7   required bytes family = 2;
  6   required bytes qualifier = 3;
  5   optional uint64 timestamp = 4;
  4   optional KeyType keyType = 5;
  3   optional bytes value = 6;
  2 }
{code}

Are you suggesting that we change KeyValueSortReducer from:

{code}
public class KeyValueSortReducer extends Reducer<ImmutableBytesWritable, KeyValue, ImmutableBytesWritable,
KeyValue> {
{code}

to

{code}
public class KeyValueSortReducer extends Reducer<ImmutableBytesWritable, KeyValue, ImmutableBytesWritable,
HBaseProtos.KeyValue> {
                                                                                         
                 ^^^^^^^^^^^^^^^^^^^^^
{code}

HBaseProtos.KeyValue implements https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/GeneratedMessage

This has what I started to list in the above proposed Interface including writeTo and writeDelimitedTo,
etc.

I think this a good idea.  No pollution of KV or Cell w/ serialization.

Let me add it.
                
> Remove Writable Interface from KeyValue
> ---------------------------------------
>
>                 Key: HBASE-7233
>                 URL: https://issues.apache.org/jira/browse/HBASE-7233
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>            Priority: Blocker
>         Attachments: 7233.txt, 7233-v2.txt
>
>
> Undo KeyValue being a Writable.

--
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

Mime
View raw message