hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stack <st...@duboce.net>
Subject Re: HBase Utility functions (for Java 5+)
Date Tue, 15 Dec 2009 06:03:19 GMT
HBase requires java 6 (1.6) or above.
St.Ack

On Mon, Dec 14, 2009 at 7:41 PM, Paul Smith <psmith@aconex.com> wrote:

> Just wondering if anyone knows of an existing Hbase utility library that is
> open sourced that can assist those that have Java5 and above.  I'm starting
> off in Hbase, and thinking it'd be great to have API calls similar to the
> Google Collections framework.  If one doesn't exist, I think I could start
> off a new project in Google Code (ASL it).  I think Hbase is targetted <
> Java 5, so can't take advantage of this yet internally.
>
> The sorts of API functions I thought would be useful to make code more
> readable would be something like:
>
>
>        HTable hTable = new
> TableBuilder(hbaseConfiguration).withTableName("foo")
>                .withSimpleColumnFamilies("bar", "eek",
> "moo").deleteAndRecreate();
>
> and
>
>        ResultScanner scanner = new
> ResultScannerBuilder(hTable).withColumnFamilies(
>                "family1", "family2").build();
>
>
> taking advantage of varargs liberally and using nice Patterns etc.  While
> the Bytes class is useful, I'd personally benefit from an API that can
> easily pack arbitrary multiple ints (and other data types) together into
> byte[] for RowKeyGoodness(tm) ala:
>
> byte[] rowKey = BytePacker.pack(fooId, barId, eekId, mooId);
>
> (behind the scenes this is a vararg method that recursively packs each into
> into byte[] via Bytes.add(byte[] b1, byte[] b2) etc.
>
> If anyone knows of a library that does this, pointers please.
>
> cheers,
>
> Paul

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message