You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by ch huang <ju...@gmail.com> on 2013/08/05 10:59:57 UTC

issue about put key value and reverse key value into hbase

hi,all:

i have a key value like 'testkey'  , and value '\x00\x00R', i wanto to
store them in hbase as rowkey and value

rowkey   =>  'testkey'  , info:key => '\x00\x00R'

and

rowkey => '\x00\x00R' ,info:value => 'testkey'

but i try the following command ,it not correct

hbase(main):001:0> put 'demo','\x00\x00R','info:kv','testme'
0 row(s) in 0.1180 seconds
hbase(main):002:0> scan 'demo'
ROW                                           COLUMN+CELL
 \x5Cx00\x5Cx00R                              column=info:kv,
timestamp=1375692802127, value=testme
1 row(s) in 0.0610 seconds
hbase(main):003:0> put 'demo','testme','info:vk','\x00\x00R'
0 row(s) in 0.0060 seconds
hbase(main):004:0> scan 'demo'
ROW                                           COLUMN+CELL
 \x5Cx00\x5Cx00R                              column=info:kv,
timestamp=1375692802127, value=testme
 testme                                       column=info:vk,
timestamp=1375693076792, value=\x5Cx00\x5Cx00R
2 row(s) in 0.0190 seconds

Re: issue about put key value and reverse key value into hbase

Posted by ch huang <ju...@gmail.com>.
thanks ,it's work fine!

On Mon, Aug 5, 2013 at 9:37 PM, Ted Yu <yu...@gmail.com> wrote:

> Can you try double quote ?
>
> hbase(main):004:0> put 'usertable', "\x00\x00R", 'family', 'won'
> 0 row(s) in 0.1200 seconds
>
> hbase(main):005:0> get 'usertable', "\x00\x00R"
> COLUMN                                  CELL
>  family:                                timestamp=1375709809258, value=won
> 1 row(s) in 0.0190 seconds
>
> On Mon, Aug 5, 2013 at 1:59 AM, ch huang <ju...@gmail.com> wrote:
>
> > hi,all:
> >
> > i have a key value like 'testkey'  , and value '\x00\x00R', i wanto to
> > store them in hbase as rowkey and value
> >
> > rowkey   =>  'testkey'  , info:key => '\x00\x00R'
> >
> > and
> >
> > rowkey => '\x00\x00R' ,info:value => 'testkey'
> >
> > but i try the following command ,it not correct
> >
> > hbase(main):001:0> put 'demo','\x00\x00R','info:kv','testme'
> > 0 row(s) in 0.1180 seconds
> > hbase(main):002:0> scan 'demo'
> > ROW                                           COLUMN+CELL
> >  \x5Cx00\x5Cx00R                              column=info:kv,
> > timestamp=1375692802127, value=testme
> > 1 row(s) in 0.0610 seconds
> > hbase(main):003:0> put 'demo','testme','info:vk','\x00\x00R'
> > 0 row(s) in 0.0060 seconds
> > hbase(main):004:0> scan 'demo'
> > ROW                                           COLUMN+CELL
> >  \x5Cx00\x5Cx00R                              column=info:kv,
> > timestamp=1375692802127, value=testme
> >  testme                                       column=info:vk,
> > timestamp=1375693076792, value=\x5Cx00\x5Cx00R
> > 2 row(s) in 0.0190 seconds
> >
>

Re: issue about put key value and reverse key value into hbase

Posted by Ted Yu <yu...@gmail.com>.
Can you try double quote ?

hbase(main):004:0> put 'usertable', "\x00\x00R", 'family', 'won'
0 row(s) in 0.1200 seconds

hbase(main):005:0> get 'usertable', "\x00\x00R"
COLUMN                                  CELL
 family:                                timestamp=1375709809258, value=won
1 row(s) in 0.0190 seconds

On Mon, Aug 5, 2013 at 1:59 AM, ch huang <ju...@gmail.com> wrote:

> hi,all:
>
> i have a key value like 'testkey'  , and value '\x00\x00R', i wanto to
> store them in hbase as rowkey and value
>
> rowkey   =>  'testkey'  , info:key => '\x00\x00R'
>
> and
>
> rowkey => '\x00\x00R' ,info:value => 'testkey'
>
> but i try the following command ,it not correct
>
> hbase(main):001:0> put 'demo','\x00\x00R','info:kv','testme'
> 0 row(s) in 0.1180 seconds
> hbase(main):002:0> scan 'demo'
> ROW                                           COLUMN+CELL
>  \x5Cx00\x5Cx00R                              column=info:kv,
> timestamp=1375692802127, value=testme
> 1 row(s) in 0.0610 seconds
> hbase(main):003:0> put 'demo','testme','info:vk','\x00\x00R'
> 0 row(s) in 0.0060 seconds
> hbase(main):004:0> scan 'demo'
> ROW                                           COLUMN+CELL
>  \x5Cx00\x5Cx00R                              column=info:kv,
> timestamp=1375692802127, value=testme
>  testme                                       column=info:vk,
> timestamp=1375693076792, value=\x5Cx00\x5Cx00R
> 2 row(s) in 0.0190 seconds
>