You are asking Stargate for XML representation. HBase stores data of arbitrary 
byte[]. Also, characters like '<' and '>' will confuse various XML parsers. 
Therefore Stargate must base 64 encode the row key, column, qualifier, and data 
to be XML safe.

You can also ask for protobufs (application/x-protobuf) or binary 
(application/octet-stream) representations, which will not apply base 64 
encoding. Protobufs is the best option. Binary has some limitations. See 
https://issues.apache.org/jira/browse/HBASE-1788 and 
https://issues.apache.org/jira/browse/HBASE-2390 for discussion of the 
limitations of the binary representation semantics and proposed fixes.

   - Andy


> From: yuliya Feldman
> Subject: Re: strange stargate problem
> To: user@hbase.apache.org
> Date: Tuesday, June 29, 2010, 10:59 PM
> It looks like Base64 encoded
> 
> Try: http://www.motobit.com/util/base64-decoder-encoder.asp
> to decode the data
> 
> 
> 
> ----- Original Message ----
> From: Eric Yang <eric...@gmail.com>
> To: user@hbase.apache.org
> Sent: Tue, June 29, 2010 10:29:17 PM
> Subject: strange stargate problem
> 
> Hi all,
> I am playing with Hbase 0.20.5 with Stargate.  When
> data is stored
> into hbase via hbase shell, the data retrieval via Stargate
> rest api
> seems strange.
> This is what it looks like in hbase shell:
> 
> hbase(main):001:0> scan "chukwa"
> ROW               
>           COLUMN+CELL
>  1277874000000-Eric-Yangs-iM column=TsProcessor:body,
> timestamp=1277875166476, value=2010-06-29 22:19:26,476 I
>  ac.local             
>       NFO
> org.apache.hadoop.chukwa.TsProcessor=
> 0: Filesystem    512-blocks     
> Used A
>                
>          
>    vailable Capacity  Mounted
> on\x0A/dev/disk0s2   360710144 155904760
> 204293384
>                
>          
>    44%    /\x0Adevfs   
>             215
> 215     
>    0   100%   
> /dev\x0A/dev/d
>                
>          
>    isk0s3   127015192
> 118166872   8848320
> 94%    /Volumes/Windows\x0Amap -hosts
>                
>                
>         0     
>    0     
>    0   100%
>  /net\x0Amap auto_home          0
>                
>                
> 0     
>    0   100%   
> /home\x0A
>  1277874000000-Eric-Yangs-iM column=TsProcessor:ctags,
> timestamp=1277875166476, value= cluster="chukwa"
>  ac.local
> 1 row(s) in 0.1240 seconds
> This is what it looks like from Stargate rest api:
> 
> <?xml version="1.0" encoding="UTF-8"
> standalone="yes"?><CellSet><Row
> key="MTI3Nzg3NDAwMDAwMC1FcmljLVlhbmdzLWlNYWMubG9jYWw="><Cell
> timestamp="1277875297653"
> column="VHNQcm9jZXNzb3I6Ym9keQ==">MjAxMC0wNi0yOSAyMjoyMTozNyw2NTMgSU5GTyBvcmcuYXBhY2hlLmhhZG9vcC5jaHVrd2EuVHNQcm9jZXNzb3I9IDA6IEZpbGVzeXN0ZW0gICAgNTEyLWJsb2NrcyAgICAgIFVzZWQgQXZhaWxhYmxlIENhcGFjaXR5ICBNb3VudGVkIG9uCi9kZXYvZGlzazBzMiAgIDM2MDcxMDE0NCAxNTU5NDYzODQgMjA0MjUxNzYwICAgIDQ0JSAgICAvCmRldmZzICAgICAgICAgICAgICAgIDIxNSAgICAgICAyMTUgICAgICAgICAwICAgMTAwJSAgICAvZGV2Ci9kZXYvZGlzazBzMyAgIDEyNzAxNTE5MiAxMTgxNjY4NzIgICA4ODQ4MzIwICAgIDk0JSAgICAvVm9sdW1lcy9XaW5kb3dzCm1hcCAtaG9zdHMgICAgICAgICAgICAgMCAgICAgICAgIDAgICAgICAgICAwICAgMTAwJSAgICAvbmV0Cm1hcCBhdXRvX2hvbWUgICAgICAgICAgMCAgICAgICAgIDAgICAgICAgICAwICAgMTAwJSAgICAvaG9tZQo=</Cell><Cell
> timestamp="1277875297595"
> column="VHNQcm9jZXNzb3I6Ym9keQ==">MjAxMC0wNi0yOSAyMjoyMTozNyw1OTUgSU5GTyBvcmcuYXBhY2hlLmhhZG9vcC5jaHVrd2EuVHNQcm9jZXNzb3I9IDA6IEZpbGVzeXN0ZW0gICAgNTEyLWJsb2NrcyAgICAgIFVzZWQgQXZhaWxhYmxlIENhcGFjaXR5ICBNb3VudGVkIG9uCi9kZXYvZGlzazBzMiAgIDM2MDcxMDE0NCAxNTU5NDYzODQgMjA0MjUxNzYwICAgIDQ0JSAgICAvCmRldmZzICAgICAgICAgICAgICAgIDIxNSAgICAgICAyMTUgICAgICAgICAwICAgMTAwJSAgICAvZGV2Ci9kZXYvZGlzazBzMyAgIDEyNzAxNTE5MiAxMTgxNjY4NzIgICA4ODQ4MzIwICAgIDk0JSAgICAvVm9sdW1lcy9XaW5kb3dzCm1hcCAtaG9zdHMgICAgICAgICAgICAgMCAgICAgICAgIDAgICAgICAgICAwICAgMTAwJSAgICAvbmV0Cm1hcCBhdXRvX2hvbWUgICAgICAgICAgMCAgICAgICAgIDAgICAgICAgICAwICAgMTAwJSAgICAvaG9tZQo=</Cell><Cell
> timestamp="1277875297534"
> column="VHNQcm9jZXNzb3I6Ym9keQ==">MjAxMC0wNi0yOSAyMjoyMTozNyw1MzQgSU5GTyBvcmcuYXBhY2hlLmhhZG9vcC5jaHVrd2EuVHNQcm9jZXNzb3I9IDA6IEZpbGVzeXN0ZW0gICAgNTEyLWJsb2NrcyAgICAgIFVzZWQgQXZhaWxhYmxlIENhcGFjaXR5ICBNb3VudGVkIG9uCi9kZXYvZGlzazBzMiAgIDM2MDcxMDE0NCAxNTU5NDYzODQgMjA0MjUxNzYwICAgIDQ0JSAgICAvCmRldmZzICAgICAgICAgICAgICAgIDIxNSAgICAgICAyMTUgICAgICAgICAwICAgMTAwJSAgICAvZGV2Ci9kZXYvZGlzazBzMyAgIDEyNzAxNTE5MiAxMTgxNjY4NzIgICA4ODQ4MzIwICAgIDk0JSAgICAvVm9sdW1lcy9XaW5kb3dzCm1hcCAtaG9zdHMgICAgICAgICAgICAgMCAgICAgICAgIDAgICAgICAgICAwICAgMTAwJSAgICAvbmV0Cm1hcCBhdXRvX2hvbWUgICAgICAgICAgMCAgICAgICAgIDAgICAgICAgICAwICAgMTAwJSAgICAvaG9tZQo=</Cell><Cell
> timestamp="1277875297653"
> column="VHNQcm9jZXNzb3I6Y3RhZ3M=">IGNsdXN0ZXI9ImNodWt3YSI=</Cell><Cell
> timestamp="1277875297595"
> column="VHNQcm9jZXNzb3I6Y3RhZ3M=">IGNsdXN0ZXI9ImNodWt3YSI=</Cell><Cell
> timestamp="1277875297534"
> column="VHNQcm9jZXNzb3I6Y3RhZ3M=">IGNsdXN0ZXI9ImNodWt3YSI=</Cell></Row></CellSet>
> 
> What am I doing wrong?
> 
> regards,
> Eric





Reply via email to