hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shaun Elliott <javamonke...@gmail.com>
Subject view decoded thrift in hbase shell?
Date Thu, 18 Sep 2014 23:21:54 GMT
I have a column which has thrift encoded data and would like to view it in
hbase shell.

I have this so far:

public class ThriftToString {
    private static final TDeserializer tDeSerializer = new TDeserializer(new

    public static String getStringFromThrift(byte[] value) {
            InventoryRecord inventoryRecord = new InventoryRecord();
            try {
                tDeSerializer.deserialize(inventoryRecord, value);
                return inventoryRecord.toString();
            } catch (TException e) {

        return null;

I've figured out that I can then jar this up and add it to my
HBASE_CLASSPATH, which lets me import it in to jruby. But... how do I use it
in a get or a scan? I'm stuck. This seems like it should be relatively easy.

View this message in context: http://apache-hbase.679495.n3.nabble.com/view-decoded-thrift-in-hbase-shell-tp4064130.html
Sent from the HBase User mailing list archive at Nabble.com.

View raw message