hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrey Stepachev <oct...@gmail.com>
Subject Re: hbase shell snippet for "get" ing records with binary keys
Date Wed, 11 Aug 2010 12:39:38 GMT
And of course, you can use the Power of Ruby:

type in shell:

def fetch(table, id, args = {})
   get table, String.from_java_bytes(Writables.getBytes(id)), args
end

then you can use

> fetch 'my.table', 1234, { other get parameters }


2010/8/10 Douglas Campbell <deegs_ca@yahoo.com>:
> If I have a record whose key is binary i.e. when you do a scan and you see
> something like
>
> \xFF\xD3\xEF\xB4\xEA
>
> as the key
>
> How to pass it back into hbase shell to do a get?
>
> I tried importing Bytes class but Bytes.toBytes(above string) yields a java
> array which can't be used as an arg to get.
>
> -Doug
>
>
>
>
>

Mime
View raw message