hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars George (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (HBASE-1363) Can't use 'close region' when keys are binary
Date Wed, 10 Jun 2009 07:35:08 GMT

    [ https://issues.apache.org/jira/browse/HBASE-1363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12717967#action_12717967
] 

Lars George edited comment on HBASE-1363 at 6/10/09 12:33 AM:
--------------------------------------------------------------

No, that is fine, I also linked HBASE-1131 here too.

So I found the issue, it is the use of the single quotes! Use double quotes and it works just
fine with either hex notation
{code}
hbase(main):006:0> get ".META.", "TestTable,\x00\x00\x00\x00\x02\x00\x03\x05\x02\x00,1244575618625"
 historian:assignment        timestamp=1244581852730, value=Region assigned to server 192.168.2.103,51246,1244
                             581791755                                                   
                    
 historian:compaction        timestamp=1244581872051, value=Region compaction completed in
0sec               
 historian:open              timestamp=1244581855789, value=Region opened on server : 192.168.2.103
          
 historian:split             timestamp=1244575620931, value=Region split from: TestTable,\\x00\\x00\\x00\\x00\
                             \x02\\x00\\x03\\x05\\x02\\x00,1244575397228                 
                    
 info:regioninfo             timestamp=1244575620938, value=REGION => {NAME => 'TestTable,\\x00\\x00\\x00\\x00
                             \\x02\\x00\\x03\\x05\\x02\\x00,1244575618625', STARTKEY =>
'\\x00\\x00\\x00\\x00\
                             \x02\\x00\\x03\\x05\\x02\\x00', ENDKEY => '\\x00\\x00\\x00\\x00\\x07\\x00\\x01\\x
                             06\\x09\\x06', ENCODED => 388313306, TABLE => {{NAME =>
'TestTable', FAMILIES => 
                             [{NAME => 'info', VERSIONS => '3', COMPRESSION => 'NONE',
TTL => '2147483647', BL
                             OCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE =>
'true'}]}}               
 info:server                 timestamp=1244581855782, value=192.168.2.103:51246          
                    
 info:serverstartcode        timestamp=1244581855782, value=1244581791755                
                    
7 row(s) in 0.0670 seconds
{code}

or octets 

{code}
hbase(main):007:0> get ".META.", "TestTable,\000\000\000\000\002\000\003\005\002\000,1244575397228"
COLUMN                       CELL                                                        
                    
 historian:assignment        timestamp=1244575406127, value=Region assigned to server 192.168.2.103,63745,1244
                             555657619                                                   
                    
 historian:open              timestamp=1244575409158, value=Region opened on server : 192.168.2.103
          
 historian:split             timestamp=1244575405786, value=Region split from: TestTable,,1244572606475
      
3 row(s) in 0.0460 seconds
{code}

Now is there a side effect to recommending this? Are there other conversions taking place
that would cause problems? Should we simply have examples and a proper help page explaining
to use single quotes for literal strings and double quotes if you want to use binary notation?
This is similar to the Bash handling strings and expansions. Should be a familiar thing.

Otherwise the shell outputs it OK and with the double quotes also accepts it OK. Anything
else that is not right shell and binary strings wise? Otherwise this is a non-patch zero-change
"fix", a.k.a. a feature.




      was (Author: larsgeorge):
    No, that is fine, I also linked HBASE-1131 here too.

So I found the issue, it is the use of the single quotes! Use double quotes and it works just
fine with either hex notation
{code}
hbase(main):006:0> get ".META.", "TestTable,\x00\x00\x00\x00\x02\x00\x03\x05\x02\x00,1244575618625"
 historian:assignment        timestamp=1244581852730, value=Region assigned to server 192.168.2.103,51246,1244
                             581791755                                                   
                    
 historian:compaction        timestamp=1244581872051, value=Region compaction completed in
0sec               
 historian:open              timestamp=1244581855789, value=Region opened on server : 192.168.2.103
          
 historian:split             timestamp=1244575620931, value=Region split from: TestTable,\\x00\\x00\\x00\\x00\
                             \x02\\x00\\x03\\x05\\x02\\x00,1244575397228                 
                    
 info:regioninfo             timestamp=1244575620938, value=REGION => {NAME => 'TestTable,\\x00\\x00\\x00\\x00
                             \\x02\\x00\\x03\\x05\\x02\\x00,1244575618625', STARTKEY =>
'\\x00\\x00\\x00\\x00\
                             \x02\\x00\\x03\\x05\\x02\\x00', ENDKEY => '\\x00\\x00\\x00\\x00\\x07\\x00\\x01\\x
                             06\\x09\\x06', ENCODED => 388313306, TABLE => {{NAME =>
'TestTable', FAMILIES => 
                             [{NAME => 'info', VERSIONS => '3', COMPRESSION => 'NONE',
TTL => '2147483647', BL
                             OCKSIZE => '65536', IN_MEMORY => 'false', BLOCKCACHE =>
'true'}]}}               
 info:server                 timestamp=1244581855782, value=192.168.2.103:51246          
                    
 info:serverstartcode        timestamp=1244581855782, value=1244581791755                
                    
7 row(s) in 0.0670 seconds
{code}

or octets 

{code}
hbase(main):007:0> get ".META.", "TestTable,\000\000\000\000\002\000\003\005\002\000,1244575397228"
09/06/10 09:25:59 DEBUG client.HConnectionManager$TableServers: Cache hit for row <>
in tableName .META.: location server 192.168.2.103:51246, location region name .META.,,1
row: TestTable,,1244575397228                [B@3d6989d8                                 
     HERE COLUMN                       CELL                                              
                              
 historian:assignment        timestamp=1244575406127, value=Region assigned to server 192.168.2.103,63745,1244
                             555657619                                                   
                    
 historian:open              timestamp=1244575409158, value=Region opened on server : 192.168.2.103
          
 historian:split             timestamp=1244575405786, value=Region split from: TestTable,,1244572606475
      
3 row(s) in 0.0460 seconds
{code}

Now is there a side effect to recommending this? Are there other conversions taking place
that would cause problems? Should we simply have examples and a proper help page explaining
to use single quotes for literal strings and double quotes if you want to use binary notation?
This is similar to the Bash handling strings and expansions. Should be a familiar thing.

Otherwise the shell outputs it OK and with the double quotes also accepts it OK. Anything
else that is not right shell and binary strings wise? Otherwise this is a non-patch zero-change
"fix", a.k.a. a feature.



  
> Can't use 'close region' when keys are binary
> ---------------------------------------------
>
>                 Key: HBASE-1363
>                 URL: https://issues.apache.org/jira/browse/HBASE-1363
>             Project: Hadoop HBase
>          Issue Type: Sub-task
>    Affects Versions: 0.20.0
>            Reporter: ryan rawson
>            Assignee: Lars George
>             Fix For: 0.20.0
>
>
> maybe we should allow you to use an encoded name to close a region, or use binary escaping.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message