hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacques <whs...@gmail.com>
Subject Re: Printing integers in the Hbase shell
Date Mon, 13 Aug 2012 16:08:21 GMT
I was thinking that an easier way might even be to just add the conversion
capability at the ruby shell level.  Something like the following where you
can give a third qualifier that describes how you want it interpreted.

get|scan 'table1', {COLUMNS => ['fam:qual1:toInt', 'fam:qual2:toUTF8',
'fam:qual3:c(com.example.MySpecialConverter)']}

Pushing the schema into the server side seems like a much bigger task...

Jacques

On Mon, Aug 13, 2012 at 1:15 AM, Stack <stack@duboce.net> wrote:

> On Sun, Aug 12, 2012 at 12:52 PM, David Koch <ogdude@googlemail.com>
> wrote:
> > Hi Anil,
> >
> > Thank you for your advice.
> >
>
> We don't have a native column typing metadata facility in HBase
> currently and so there is nothing for the shell to leverage undoing
> the bytes returned in a scan.   HBase in this case just does the
> lowest common denominator toStringsBinary which will escape the
> non-printables (An exception is what the shell does when you scan the
> .META.  Here the column types are 'known' and so they are interpreted
> appropriately).
>
> We do have a metadata structure for a column family,
> HColumnDescriptor.  It has a Map into which arbitrary keyvalues can be
> stuffed.  It shouldn't be too hard coming up w/ a convention for
> typing.  The shell could consult the HColumnDescriptor before
> outputting a cell value to see if the HCD had info on how to format
> it.
>
> St.Ack
>

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