Don't use MapWritable.

In the layer above HBase, inside whatever is hosting the HBase client,
serialize the JSON to bytes and then write that to an HBase cell.  In
the same layer, reading, do the deserializations.

HBase only does byte arrays.

St.Ack


On Mon, Jan 31, 2011 at 11:30 AM, Pablo Molnar <[email protected]> wrote:
> Hi everyone,
>
> In my company we are experimenting with HBase and I'd like to know the best
> way to persist a semi-structured complex (3 levels) entity represented as
> JSON to HBase.
> I've already done successfully a Java client that persist rows in a table
> and now my target is persist this JSON.
>
> I've looked through the api and found a MapWritable class that could be
> usefull because for me is very easy to convert the JSON enitity into a Map
> and then persist it.
>
> I really appreciate some example how I could implement this
> If this is possible my next concerns would be how about if I want to create
> and index by a key (of the Map)?
>
> Thanks in advance,
> Pablo Molnar
>

Reply via email to