You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Jack Levin <ma...@gmail.com> on 2010/10/16 22:50:43 UTC

question about base64

If I have base64 encoded binary files in hbase columns, is it possible
to instruct the regionserver to decode it to binary and give it back
to me in binary format?  I am interesting it reading via REST server.

-Jack

Re: question about base64

Posted by Jack Levin <ma...@gmail.com>.
base64->binary is exactly what we need and one GET value only , what is the expected overhead ? Probably minor , yes?

-Jack


On Oct 16,ex 2010, at 4:28 PM, Andrew Purtell <ap...@apache.org> wrote:

> base64->binary

Re: question about base64

Posted by Andrew Purtell <ap...@apache.org>.
Hi Jack,

There are three representations the REST server can return, selectable by the client via the Accept header:

  text/xml: XML representation, base64 encoding of data
  application/x-protobuf:  pbuf representation, see the *.proto files
  application/octet-stream:  plain binary

It's the last one you want obviously.

A limitation with application/octet-stream is only one value can be retrieved or stored at a time using that representation. (In contrast, the others can return complex object hierarchies of multiple versions, multiple columns, multiple rows.)

As you may know HBase table schemas support getting and setting arbitrary attributes on them. We can introduce an attribute for column families that can instruct the REST gateway to perform data encoding translation, with base64->binary as the first supported option. 

If you only require one value returned per GET then we can stop here.

Best regards,

    - Andy

> From: Jack Levin
> Subject: Re: question about base64
>
> decode base64 into raw/binary on the way out please 
> 
> -Jack
> 
> 
> On Oct 16, 2010, at 2:39 PM, Ryan Rawson wrote:
> 
> > decode base64 into raw/binary on the way out?



      

Re: question about base64

Posted by Jack Levin <ma...@gmail.com>.
decode base64 into raw/binary on the way out please 

-Jack


On Oct 16, 2010, at 2:39 PM, Ryan Rawson <ry...@gmail.com> wrote:

> decode base64 into raw/binary on the way out?

Re: question about base64

Posted by Ryan Rawson <ry...@gmail.com>.
Hi,

Right now the regionserver does not do any interpretation of the data
sent to it.  The only "exception" is that we lexographically sort the
rows, families and qualifiers, using a byte-by-byte comparison.

Are you looking to send to the regionserver base64 and have it stored
as raw/binary?  Or to decode base64 into raw/binary on the way out?
The rest server might be a better place for this logic to live.

On Sat, Oct 16, 2010 at 1:50 PM, Jack Levin <ma...@gmail.com> wrote:
> If I have base64 encoded binary files in hbase columns, is it possible
> to instruct the regionserver to decode it to binary and give it back
> to me in binary format?  I am interesting it reading via REST server.
>
> -Jack
>