hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stack <st...@duboce.net>
Subject Re: presplitting regions
Date Wed, 19 Feb 2014 19:28:15 GMT
You want to stay decimal?  Looks like your start and end keys have a
different count of digits so you should zero pad the first so both have
same count else your keys will sort in a way that may surprise.  How  many
regions do you want?  If you want to remain decimal, why not just do it by
hand and pass the set of regions on table creation?  If you mess up, delete
the table and start over.

Regards RegionSplitter, it has pretty good
http://hbase.apache.org/devapidocs/org/apache/hadoop/hbase/util/RegionSplitter.html.
 See the main description for what it does.  Is that what you want?
 HexSplitter generates hex keys.  UniformSplit might work for you but it is
doing byte 'math' so might make for some 'interesting' results.

St.Ack


On Wed, Feb 19, 2014 at 2:53 AM, Mohamed Ghareb <m.ghareeb@tedata.net>wrote:

> Ok my row key will be start from 9990000000000 and end in 3000000000000000
>
> -----Original Message-----
> From: saint.ack@gmail.com [mailto:saint.ack@gmail.com] On Behalf Of Stack
> Sent: Wednesday, February 19, 2014 12:29 AM
> To: Hbase-User
> Subject: Re: presplitting regions
>
> What are you trying to do?  Do you want hex keys or decimal keys?  Usually
> you'll want keys fixed-length and zero-padded if you don't want to be
> surprised by how they sort.
>
> St.Ack
>
>
> On Mon, Feb 17, 2014 at 3:28 AM, Mohamed Ghareb <m.ghareeb@tedata.net
> >wrote:
>
> > Kindly when I create new tables with presplitting region, I need to
> > use the firstrow & lastrow argument, my question if my key is number
> > "integer" can I put start & end row with decimal number or I need to
> > convert it to hexadecimal number hbase
> > org.apache.hadoop.hbase.util.RegionSplitter tablename HexStringSplit
> > --firstrow 9990 --lastrow 3000000 -c 5
> >
>

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