Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
HBase >> mail # user >> Re: Constructing rowkeys and HBASE-7221


Copy link to this message
-
Re: Constructing rowkeys and HBASE-7221

Hi there, well, this request for input fell like a thud.  :-)

But I think perhaps it has to do with the fact that I sent it to the
dev-list instead of the user-list, as people that are actively writing
HBase itself (devs) need less help with such keybuilding utilities.

So one last request for feedback, but this time aimed at users of HBase:
how has your key-building experience been?

Thanks!

On 1/7/13 11:04 AM, "Doug Meil" <[EMAIL PROTECTED]> wrote:

>
>Greetings folks-
>
>I would like to restart the conversation on
>https://issues.apache.org/jira/browse/HBASE-7221 because there continue
>to be conversations on the dist-list about creating composite rowkeys,
>and while HBase makes just about anything possible, it doesn¹t make much
>easy in this respect.
>
>What I¹m lobbying for is a utility class (see the v3 patch in HBASE-7221)
>that can both create and read rowkeys (so this isn¹t just a one-way
>builder pattern).
>
>This is currently stuck because it was noted that Bytes has an issue with
>sort-order of numbers specifically if you have both negative and positive
>values, which is really a different issue, but because this patch uses
>Bytes it¹s related.
>
>What are people¹s thoughts on this topic in general, and the v3 version
>of the patch specifically?  (and the last set of comments).  Thanks!
>
>One of the unit tests shows the example of usage.  The last set of
>comments suggested that RowKey be renamed FixedLengthRowKey, which I
>think is a good idea.  A follow-on patch could include
>VariableLengthRowKey for folks that use strings in the rowkeys.
>
>
>  public void testCreate() throws Exception {
>
>    int elements[] = {RowKeySchema.SIZEOF_MD5_HASH,
>RowKeySchema.SIZEOF_INT, RowKeySchema.SIZEOF_LONG};
>    RowKeySchema schema = new RowKeySchema(elements);
>
>    RowKey rowkey = schema.createRowKey();
>    rowkey.setHash(0, hashVal);
>    rowkey.setInt(1, intVal);
>    rowkey.setLong(2, longVal);
>
>    byte bytes[] = rowkey.getBytes();
>    Assert.assertEquals("key length", schema.getRowKeyLength(),
>bytes.length);
>
>    Assert.assertEquals("e1", rowkey.getInt(1), intVal);
>    Assert.assertEquals("e2", rowkey.getLong(2), longVal);
>  }
>
>Doug Meil
>Chief Software Architect, Explorys
>[EMAIL PROTECTED]
>
+
Aaron Kimball 2013-01-16, 19:06
+
Doug Meil 2013-01-17, 13:30
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB