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


Summary:

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

Email chain for posterity...

From: lars hofhansl <lhofha...@yahoo.com>
Reply-To: lars hofhansl <lhofha...@yahoo.com>
Date: Tuesday, December 11, 2012 2:53 PM
To: Doug Meil <doug.m...@explorysmedical.com>, Andrew Johnson 
<andrew.john...@explorys.com>, Ian Varley <ivar...@salesforce.com>, Elliott 
Clark <eclar...@gmail.com>, "st...@duboce.net" <st...@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.m...@explorysmedical.com>
To: lars hofhansl <lhofha...@yahoo.com>; Andrew Johnson 
<andrew.john...@explorys.com>; Ian Varley <ivar...@salesforce.com>; Elliott 
Clark <eclar...@gmail.com>; "st...@duboce.net" <st...@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.m...@explorysmedical.com>
Date: Friday, December 7, 2012 4:13 PM
To: lars hofhansl <lhofha...@yahoo.com>, Andrew Johnson 
<andrew.john...@explorys.com>, Ian Varley <ivar...@salesforce.com>, Elliott 
Clark <eclar...@gmail.com>, "st...@duboce.net" <st...@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, right?

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

Reply via email to