You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Mohamed Ghareb <m....@tedata.net> on 2014/02/13 17:43:53 UTC

hbase region server region split policy

How can I create table with pre-splitting for 10 region with policy (KeyPrefixRegionSplitPolicy)
>From the "hbase shell" and how I can specify the prefix length for the key prefix with the hbase shell.

RE: hbase region server region split policy

Posted by Mohamed Ghareb <m....@tedata.net>.
correct
I can set the policy with SPLIT_POLICY => 'KeyPrefixRegionSplitPolicy'
But I don't know how can set prefix lenght


Thanks Ted for your replay;
I know I can specify the policy with    SPLITALGO => ' KeyPrefixRegionSplitPolicy '
But I need the set the prefix length for that policy How  can i do it ?

-----Original Message-----
From: Ted Yu [mailto:yuzhihong@gmail.com]
Sent: Thursday, February 13, 2014 6:57 PM
To: user@hbase.apache.org
Subject: Re: hbase region server region split policy

Here is a sample command from ruby/shell/commands/create.rb:

  hbase> # Optionally pre-split the table into NUMREGIONS, using
  hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
  hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}

See also:
http://hbase.apache.org/book.html#arch.region.splits


On Thu, Feb 13, 2014 at 8:43 AM, Mohamed Ghareb <m....@tedata.net>wrote:

> How can I create table with pre-splitting for 10 region with policy
> (KeyPrefixRegionSplitPolicy)
> From the "hbase shell" and how I can specify the prefix length for the 
> key prefix with the hbase shell.
>

RE: hbase region server region split policy

Posted by Mohamed Ghareb <m....@tedata.net>.
Ohh ok 

Many thanks for your help



-----Original Message-----
From: Ted Yu [mailto:yuzhihong@gmail.com] 
Sent: Thursday, February 13, 2014 7:53 PM
To: user@hbase.apache.org
Subject: Re: hbase region server region split policy

The dynamic config went into 0.94.7 through HBASE-8176

Please consider upgrading your deployment.

Cheers


On Thu, Feb 13, 2014 at 9:43 AM, Mohamed Ghareb <m....@tedata.net>wrote:

> It return error
> ameError: uninitialized constant CONFIG
> hbase(main):079:0* alter 'testsplit1', METHOD => 'table_att', CONFIG 
> => {'KeyPrefixRegionSplitPolicy.prefix_length' => '5'}
>
>
> then I run it with
> alter 'testsplit1', METHOD => 'table_att', CONFIGURATION => 
> {'KeyPrefixRegionSplitPolicy.prefix_length' => '5'}
>
> with the error
> NameError: uninitialized constant CONFIGURATION
>
>
> I ran hbase version 0.94.6-cdh4.5.0,
>
>
> The prefix length is determined by
> "KeyPrefixRegionSplitPolicy.prefix_length"
> attribute of table descriptor
>
> You can change the table-scope by setting attribute CONFIG like this:
>   hbase> alter 'test', METHOD=>'table_att', CONFIG => 
> {'KeyPrefixRegionSplitPolicy.prefix_length' => '5'}
>
> See more examples in shell/commands/alter.rb
>
> Cheers
>
>
> On Thu, Feb 13, 2014 at 9:07 AM, Mohamed Ghareb <m.ghareeb@tedata.net
> >wrote:
>
> > Thanks Ted for your replay;
> > I know I can specify the policy with    SPLITALGO => '
> > KeyPrefixRegionSplitPolicy '
> > But I need the set the prefix length for that policy How  can i do 
> > it ?
> >
> > -----Original Message-----
> > From: Ted Yu [mailto:yuzhihong@gmail.com]
> > Sent: Thursday, February 13, 2014 6:57 PM
> > To: user@hbase.apache.org
> > Subject: Re: hbase region server region split policy
> >
> > Here is a sample command from ruby/shell/commands/create.rb:
> >
> >   hbase> # Optionally pre-split the table into NUMREGIONS, using
> >   hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
> >   hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 
> > 'HexStringSplit'}
> >
> > See also:
> > http://hbase.apache.org/book.html#arch.region.splits
> >
> >
> > On Thu, Feb 13, 2014 at 8:43 AM, Mohamed Ghareb 
> > <m.ghareeb@tedata.net
> > >wrote:
> >
> > > How can I create table with pre-splitting for 10 region with 
> > > policy
> > > (KeyPrefixRegionSplitPolicy)
> > > From the "hbase shell" and how I can specify the prefix length for 
> > > the key prefix with the hbase shell.
> > >
> >
>

Re: hbase region server region split policy

Posted by Ted Yu <yu...@gmail.com>.
The dynamic config went into 0.94.7 through HBASE-8176

Please consider upgrading your deployment.

Cheers


On Thu, Feb 13, 2014 at 9:43 AM, Mohamed Ghareb <m....@tedata.net>wrote:

> It return error
> ameError: uninitialized constant CONFIG
> hbase(main):079:0* alter 'testsplit1', METHOD => 'table_att', CONFIG =>
> {'KeyPrefixRegionSplitPolicy.prefix_length' => '5'}
>
>
> then I run it with
> alter 'testsplit1', METHOD => 'table_att', CONFIGURATION =>
> {'KeyPrefixRegionSplitPolicy.prefix_length' => '5'}
>
> with the error
> NameError: uninitialized constant CONFIGURATION
>
>
> I ran hbase version 0.94.6-cdh4.5.0,
>
>
> The prefix length is determined by
> "KeyPrefixRegionSplitPolicy.prefix_length"
> attribute of table descriptor
>
> You can change the table-scope by setting attribute CONFIG like this:
>   hbase> alter 'test', METHOD=>'table_att', CONFIG =>
> {'KeyPrefixRegionSplitPolicy.prefix_length' => '5'}
>
> See more examples in shell/commands/alter.rb
>
> Cheers
>
>
> On Thu, Feb 13, 2014 at 9:07 AM, Mohamed Ghareb <m.ghareeb@tedata.net
> >wrote:
>
> > Thanks Ted for your replay;
> > I know I can specify the policy with    SPLITALGO => '
> > KeyPrefixRegionSplitPolicy '
> > But I need the set the prefix length for that policy How  can i do it
> > ?
> >
> > -----Original Message-----
> > From: Ted Yu [mailto:yuzhihong@gmail.com]
> > Sent: Thursday, February 13, 2014 6:57 PM
> > To: user@hbase.apache.org
> > Subject: Re: hbase region server region split policy
> >
> > Here is a sample command from ruby/shell/commands/create.rb:
> >
> >   hbase> # Optionally pre-split the table into NUMREGIONS, using
> >   hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
> >   hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO =>
> > 'HexStringSplit'}
> >
> > See also:
> > http://hbase.apache.org/book.html#arch.region.splits
> >
> >
> > On Thu, Feb 13, 2014 at 8:43 AM, Mohamed Ghareb <m.ghareeb@tedata.net
> > >wrote:
> >
> > > How can I create table with pre-splitting for 10 region with policy
> > > (KeyPrefixRegionSplitPolicy)
> > > From the "hbase shell" and how I can specify the prefix length for
> > > the key prefix with the hbase shell.
> > >
> >
>

RE: hbase region server region split policy

Posted by Mohamed Ghareb <m....@tedata.net>.
It return error
ameError: uninitialized constant CONFIG
hbase(main):079:0* alter 'testsplit1', METHOD => 'table_att', CONFIG => {'KeyPrefixRegionSplitPolicy.prefix_length' => '5'}


then I run it with 
alter 'testsplit1', METHOD => 'table_att', CONFIGURATION => {'KeyPrefixRegionSplitPolicy.prefix_length' => '5'}

with the error
NameError: uninitialized constant CONFIGURATION


I ran hbase version 0.94.6-cdh4.5.0,


The prefix length is determined by "KeyPrefixRegionSplitPolicy.prefix_length"
attribute of table descriptor

You can change the table-scope by setting attribute CONFIG like this:
  hbase> alter 'test', METHOD=>'table_att', CONFIG => {'KeyPrefixRegionSplitPolicy.prefix_length' => '5'}

See more examples in shell/commands/alter.rb

Cheers


On Thu, Feb 13, 2014 at 9:07 AM, Mohamed Ghareb <m....@tedata.net>wrote:

> Thanks Ted for your replay;
> I know I can specify the policy with    SPLITALGO => '
> KeyPrefixRegionSplitPolicy '
> But I need the set the prefix length for that policy How  can i do it 
> ?
>
> -----Original Message-----
> From: Ted Yu [mailto:yuzhihong@gmail.com]
> Sent: Thursday, February 13, 2014 6:57 PM
> To: user@hbase.apache.org
> Subject: Re: hbase region server region split policy
>
> Here is a sample command from ruby/shell/commands/create.rb:
>
>   hbase> # Optionally pre-split the table into NUMREGIONS, using
>   hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
>   hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 
> 'HexStringSplit'}
>
> See also:
> http://hbase.apache.org/book.html#arch.region.splits
>
>
> On Thu, Feb 13, 2014 at 8:43 AM, Mohamed Ghareb <m.ghareeb@tedata.net
> >wrote:
>
> > How can I create table with pre-splitting for 10 region with policy
> > (KeyPrefixRegionSplitPolicy)
> > From the "hbase shell" and how I can specify the prefix length for 
> > the key prefix with the hbase shell.
> >
>

Re: hbase region server region split policy

Posted by Ted Yu <yu...@gmail.com>.
The prefix length is determined by "KeyPrefixRegionSplitPolicy.prefix_length"
attribute of table descriptor

You can change the table-scope by setting attribute CONFIG like this:
  hbase> alter 'test', METHOD=>'table_att', CONFIG =>
{'KeyPrefixRegionSplitPolicy.prefix_length' => '5'}

See more examples in shell/commands/alter.rb

Cheers


On Thu, Feb 13, 2014 at 9:07 AM, Mohamed Ghareb <m....@tedata.net>wrote:

> Thanks Ted for your replay;
> I know I can specify the policy with    SPLITALGO => '
> KeyPrefixRegionSplitPolicy '
> But I need the set the prefix length for that policy
> How  can i do it ?
>
> -----Original Message-----
> From: Ted Yu [mailto:yuzhihong@gmail.com]
> Sent: Thursday, February 13, 2014 6:57 PM
> To: user@hbase.apache.org
> Subject: Re: hbase region server region split policy
>
> Here is a sample command from ruby/shell/commands/create.rb:
>
>   hbase> # Optionally pre-split the table into NUMREGIONS, using
>   hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
>   hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO =>
> 'HexStringSplit'}
>
> See also:
> http://hbase.apache.org/book.html#arch.region.splits
>
>
> On Thu, Feb 13, 2014 at 8:43 AM, Mohamed Ghareb <m.ghareeb@tedata.net
> >wrote:
>
> > How can I create table with pre-splitting for 10 region with policy
> > (KeyPrefixRegionSplitPolicy)
> > From the "hbase shell" and how I can specify the prefix length for the
> > key prefix with the hbase shell.
> >
>

RE: hbase region server region split policy

Posted by Mohamed Ghareb <m....@tedata.net>.
Thanks Ted for your replay;
I know I can specify the policy with    SPLITALGO => ' KeyPrefixRegionSplitPolicy '
But I need the set the prefix length for that policy 
How  can i do it ?

-----Original Message-----
From: Ted Yu [mailto:yuzhihong@gmail.com] 
Sent: Thursday, February 13, 2014 6:57 PM
To: user@hbase.apache.org
Subject: Re: hbase region server region split policy

Here is a sample command from ruby/shell/commands/create.rb:

  hbase> # Optionally pre-split the table into NUMREGIONS, using
  hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
  hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO => 'HexStringSplit'}

See also:
http://hbase.apache.org/book.html#arch.region.splits


On Thu, Feb 13, 2014 at 8:43 AM, Mohamed Ghareb <m....@tedata.net>wrote:

> How can I create table with pre-splitting for 10 region with policy
> (KeyPrefixRegionSplitPolicy)
> From the "hbase shell" and how I can specify the prefix length for the 
> key prefix with the hbase shell.
>

Re: hbase region server region split policy

Posted by Ted Yu <yu...@gmail.com>.
Here is a sample command from ruby/shell/commands/create.rb:

  hbase> # Optionally pre-split the table into NUMREGIONS, using
  hbase> # SPLITALGO ("HexStringSplit", "UniformSplit" or classname)
  hbase> create 't1', 'f1', {NUMREGIONS => 15, SPLITALGO =>
'HexStringSplit'}

See also:
http://hbase.apache.org/book.html#arch.region.splits


On Thu, Feb 13, 2014 at 8:43 AM, Mohamed Ghareb <m....@tedata.net>wrote:

> How can I create table with pre-splitting for 10 region with policy
> (KeyPrefixRegionSplitPolicy)
> From the "hbase shell" and how I can specify the prefix length for the key
> prefix with the hbase shell.
>