hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: convert hbase Result into an easy-to-parse string
Date Tue, 11 Nov 2014 23:08:11 GMT
Currently Result's toString() calls toString() method of each Cell
(KeyValue) it contains.
KeyValue's toString() method is implemented like this:

    return keyToString(this.bytes, this.offset + ROW_OFFSET,
getKeyLength()) + "/vlen="

      + getValueLength() + "/seqid=" + seqId;

Meaning value is not part of the String.


On Tue, Nov 11, 2014 at 2:46 PM, Jian Feng <freedafeng@yahoo.com.invalid>

> I see the 'Result' class has a toString() method. what I need is a
> serialized form of the object, so that I can process the key values later
> on. The problem I am trying to solve is that I need to convert the object
> to a string then transfer this string to Python, and then let Python codes
> to process the hbase result.
> This will be used in py-spark program. but unfortunately I don't have much
> knowledge of java or even scala. I can write simple java/scala programs if
> you guys can give me some helps on how to do this.
> I like sth like,
> row-key: column-family1:column-qualifier1: value1;
> column-family2:column-qualifier2:values2;....
> Thanks!

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