use of org.apache.thrift.protocol.TSimpleJSONProtocol in project hive by apache.
the class HBaseReadWrite method dumpThriftObject.
private String dumpThriftObject(TBase obj) throws TException, UnsupportedEncodingException {
TMemoryBuffer buf = new TMemoryBuffer(1000);
TProtocol protocol = new TSimpleJSONProtocol(buf);
obj.write(protocol);
return buf.toString("UTF-8");
}
Aggregations