phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Abhilash L L <abhil...@capillarytech.com>
Subject Re: Specifying splits for composite row keys
Date Fri, 20 Jun 2014 02:11:14 GMT
Hello,

   Need help as I was looking for a command line counterpart for the
following:

CREATE TABLE IF NOT EXISTS "my_case_sensitive_table"
    ( "id" char(10) not null primary key, "value" integer)
    DATA_BLOCK_ENCODING='NONE',MAX_FILESIZE=2000000 split on (?, ?, ?)

Defines a split point for a table. Use a bind parameter with
preparedStatement.setBinary(int,byte[]) to supply arbitrary bytes.



Regards,
Abhilash L L
Capillary Technologies
M:919886208262
abhilash@capillarytech.com | www.capillarytech.com

Email from people at capillarytech.com may not represent official policy of
 Capillary Technologies unless explicitly stated. Please see our
Corporate-Email-Policy
<http://support.capillary.co.in/policy-public/Corporate-Email-Policy.pdf>
for details. Contents of this email are confidential. Please contact the
Sender if you have received this email in error.



On Tue, Jun 17, 2014 at 3:03 PM, Abhilash L L <abhilash@capillarytech.com>
wrote:

> Hello,
>
>    Im trying to construct a corresponding create table statement in
> phoenix for the following hbase create table statement. Facing an issue
> while specifying the splits.
>
> create 'my_table', {NAME=>'S', COMPRESSION=>'LZO', VERSIONS=>1},
> {SPLITS=>["\x80\x00\x012\x80ZO'", "\x80\x00\x01\xe6\x81\xce\xbe]",
> "\x80\x00\x03\x12\x81+<\t"]}, {METHOD => 'table_att', MAX_FILESIZE =>
> '16106127360', CONFIG => {'SPLIT_POLICY' =>
> 'org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy'}}
>
>
> Creates the splits as expected.
>
>
>
> The below phoenix statement,
>
> CREATE TABLE "my_table" (
>  "id" INTEGER NOT NULL,
>  "id2" INTEGER NOT NULL,
>  "S"."f1" VARCHAR,
>  "S"."f2" INTEGER
> CONSTRAINT pk PRIMARY KEY ("id", "id2") )
> MAX_FILESIZE=16106127360,
> COMPRESSION='LZO',
> VERSIONS=1,
> SPLIT_POLICY='org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy'
>
> SPLIT ON ('\x80\x00\x01\xe6\x81\xce\xbe]', '\x80\x00\x03\x12\x81+<\\t');
>
> is taking the splits as literal constants.
>
>
> I checked the phoenix sql grammar, which allows only string, boolean,
> numeric values.
>
> How do we specify splits for composite row keys, which could be 'concat'
> of bytes with any necessary lengths/delimiters ?
>
> Regards,
> Abhilash L L
> Capillary Technologies
> M:919886208262
> abhilash@capillarytech.com | www.capillarytech.com
>
> Email from people at capillarytech.com may not represent official policy
> of  Capillary Technologies unless explicitly stated. Please see our
> Corporate-Email-Policy
> <http://support.capillary.co.in/policy-public/Corporate-Email-Policy.pdf>
> for details. Contents of this email are confidential. Please contact the
> Sender if you have received this email in error.
>
>

-- 
Email from people at capillarytech.com may not represent official policy of 
Capillary Technologies unless explicitly stated. Please see our 
Corporate-Email-Policy for details.Contents of this email are confidential. 
Please contact the Sender if you have received this email in error.

Mime
View raw message