hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Meil (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7221) RowKey utility class for rowkey construction
Date Tue, 18 Dec 2012 16:08:14 GMT

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

Doug Meil commented on HBASE-7221:


1) LarsH was generally ok with this approach as long as it used a proposed new method in Bytes
that would retain sort order negative-to-positive (which Bytes currently doesn't support).
 This would be in a different Jira.

2) The class RowKey would be changed to something like FixedLengthRowKey.  RowKeySchema is

Email chain for posterity...

From: lars hofhansl <lhofhansl@yahoo.com>
Reply-To: lars hofhansl <lhofhansl@yahoo.com>
Date: Tuesday, December 11, 2012 2:53 PM
To: Doug Meil <doug.meil@explorysmedical.com>, Andrew Johnson <andrew.johnson@explorys.com>,
Ian Varley <ivarley@salesforce.com>, Elliott Clark <eclark84@gmail.com>, "stack@duboce.net"
Subject: Re: hbase-7221?

Bytes.toBytes can't change. It needs to be efficient. We need a new method.
The RowKeyBuilder (or whatever we'll call) should use that. It won't useful (IMHO) until we
have that method finished.

-- Lars

From: Doug Meil <doug.meil@explorysmedical.com>
To: lars hofhansl <lhofhansl@yahoo.com>; Andrew Johnson <andrew.johnson@explorys.com>;
Ian Varley <ivarley@salesforce.com>; Elliott Clark <eclark84@gmail.com>; "stack@duboce.net"
Sent: Tuesday, December 11, 2012 11:40 AM
Subject: Re: hbase-7221?

Hey Lars, is that the plan?  Separate ticket for the new Bytes.toBytes method?

Do you want to update the Jira for 7221 for the agreement or do you want me to?

From: Doug Meil <doug.meil@explorysmedical.com>
Date: Friday, December 7, 2012 4:13 PM
To: lars hofhansl <lhofhansl@yahoo.com>, Andrew Johnson <andrew.johnson@explorys.com>,
Ian Varley <ivarley@salesforce.com>, Elliott Clark <eclark84@gmail.com>, "stack@duboce.net"
Subject: Re: hbase-7221?

Works for me.  And also some serious JavaDoc is needed around the existing Bytes.toBytes methods
documenting the issue so people aren't surprised.  These are items in a different Jira though,

And then RowKey uses the new toBytes method.

We should carry a summary of this conversation back into the Jira for 7221.  

Thanks, Lars!

> RowKey utility class for rowkey construction
> --------------------------------------------
>                 Key: HBASE-7221
>                 URL: https://issues.apache.org/jira/browse/HBASE-7221
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Doug Meil
>            Assignee: Doug Meil
>            Priority: Minor
>         Attachments: HBASE_7221.patch, hbase-common_hbase_7221_2.patch, hbase-common_hbase_7221_v3.patch
> A common question in the dist-lists is how to construct rowkeys, particularly composite
keys.  Put/Get/Scan specifies byte[] as the rowkey, but it's up to you to sensibly populate
that byte-array, and that's where things tend to go off the rails.
> The intent of this RowKey utility class isn't meant to add functionality into Put/Get/Scan,
but rather make it simpler for folks to construct said arrays.  Example:
> {code}
>    RowKey key = RowKey.create(RowKey.SIZEOF_MD5_HASH + RowKey.SIZEOF_LONG);
>    key.addHash(a);
>    key.add(b);
>    byte bytes[] = key.getBytes();
> {code} 

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