hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Viral Bajaria <viral.baja...@gmail.com>
Subject Re: PreSplit the table with Long format
Date Tue, 19 Feb 2013 10:00:45 GMT
HBase shell is a jruby shell and so you can invoke any java commands from
it.

For example:
> import org.apache.hadoop.hbase.util.Bytes
> Bytes.toLong(Bytes.toBytes(1000))

Not sure if this works as expected since I don't have a terminal in front
of me but you could try (assuming the SPLITS keyword takes byte array as
input, never used SPLITS from the command line):
create 'testTable', 'cf1' , { SPLITS => [ Bytes.toBytes(1000),
Bytes.toBytes(2000), Bytes.toBytes(3000) ] }

Thanks,
Viral

On Tue, Feb 19, 2013 at 1:52 AM, Farrokh Shahriari <
mohandes.zebeleh.67@gmail.com> wrote:

> Hi there
> As I use rowkey in long format,I must presplit table in long format too.But
> when I've run this command,it presplit the table with STRING format :
> create 'testTable','cf1',{SPLITS => [ '1000','2000','3000']}
>
> How can I presplit the table with Long format ?
>
> Farrokh
>

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