You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Flavio Pompermaier <po...@okkam.it> on 2015/01/30 09:01:41 UTC
Fwd: Crete table with salting and compression
Hi to all,
I'm using phoenix 4.2.2 and I'm trying to create a table both with
compression and salting but this seems not to be possible.
Here's my SQL:
CREATE TABLE IF NOT EXISTS %s (ID BIGINT NOT NULL, S VARCHAR NOT NULL,
MODEL VARCHAR CONSTRAINT pk PRIMARY KEY (ID, S)) SALT_BUCKETS=10
COMPRESSION='GZ', BLOCKSIZE='4096'";
If I do
CREATE TABLE IF NOT EXISTS %s (ID BIGINT NOT NULL, S VARCHAR NOT NULL,
MODEL VARCHAR CONSTRAINT pk PRIMARY KEY (ID, S)) COMPRESSION='GZ',
BLOCKSIZE='4096'";
or
CREATE TABLE IF NOT EXISTS %s (ID BIGINT NOT NULL, S VARCHAR NOT NULL,
MODEL VARCHAR CONSTRAINT pk PRIMARY KEY (ID, S)) SALT_BUCKETS=10;
everything works, but not putting all options together as in the first
example..
is this a bug or there's something I cannot see?
Best,
Flavio
Re: Crete table with salting and compression
Posted by James Taylor <ja...@apache.org>.
Hi Flavio,
Did you see Mujtaba's response (repeated below) and did it work out
for you after making that change?
Date: Tue, 27 Jan 2015 10:02:29 -0800
Subject: Re: Crete table with salting and compression
From: Mujtaba Chohan <mu...@apache.org>
To: "dev@phoenix.apache.org" <de...@phoenix.apache.org>
I think you are missing a comma after SALT_BUCKETS=10*,* in your first
example.
On Fri, Jan 30, 2015 at 12:01 AM, Flavio Pompermaier
<po...@okkam.it> wrote:
> Hi to all,
>
> I'm using phoenix 4.2.2 and I'm trying to create a table both with
> compression and salting but this seems not to be possible.
>
> Here's my SQL:
>
> CREATE TABLE IF NOT EXISTS %s (ID BIGINT NOT NULL, S VARCHAR NOT NULL, MODEL
> VARCHAR CONSTRAINT pk PRIMARY KEY (ID, S)) SALT_BUCKETS=10 COMPRESSION='GZ',
> BLOCKSIZE='4096'";
>
> If I do
>
> CREATE TABLE IF NOT EXISTS %s (ID BIGINT NOT NULL, S VARCHAR NOT NULL, MODEL
> VARCHAR CONSTRAINT pk PRIMARY KEY (ID, S)) COMPRESSION='GZ',
> BLOCKSIZE='4096'";
>
> or
>
> CREATE TABLE IF NOT EXISTS %s (ID BIGINT NOT NULL, S VARCHAR NOT NULL, MODEL
> VARCHAR CONSTRAINT pk PRIMARY KEY (ID, S)) SALT_BUCKETS=10;
>
> everything works, but not putting all options together as in the first
> example..
>
> is this a bug or there's something I cannot see?
>
> Best,
> Flavio
>
>
Re: Fwd: Crete table with salting and compression
Posted by Flavio Pompermaier <po...@okkam.it>.
You're right..that works!
Thanks!
On Fri, Jan 30, 2015 at 9:19 AM, sunfl@certusnet.com.cn <
sunfl@certusnet.com.cn> wrote:
> Hi,
> Aha, you are missing a comma after you specifying SALT_BUCKETS=10 The
> following sql grammer should work
> CREATE TABLE IF NOT EXISTS %s
> (ID BIGINT NOT NULL,
> S VARCHAR NOT NULL,
> MODEL VARCHAR
> CONSTRAINT pk PRIMARY KEY (ID, S)) SALT_BUCKETS=10,
> COMPRESSION='GZ', BLOCKSIZE='4096';
>
>
> ------------------------------
> ------------------------------
>
> CertusNet
>
>
> *From:* Flavio Pompermaier <po...@okkam.it>
> *Date:* 2015-01-30 16:01
> *To:* user <us...@phoenix.apache.org>
> *Subject:* Fwd: Crete table with salting and compression
> Hi to all,
>
> I'm using phoenix 4.2.2 and I'm trying to create a table both with
> compression and salting but this seems not to be possible.
>
> Here's my SQL:
>
> CREATE TABLE IF NOT EXISTS %s (ID BIGINT NOT NULL, S VARCHAR NOT NULL,
> MODEL VARCHAR CONSTRAINT pk PRIMARY KEY (ID, S)) SALT_BUCKETS=10
> COMPRESSION='GZ', BLOCKSIZE='4096'";
>
> If I do
>
> CREATE TABLE IF NOT EXISTS %s (ID BIGINT NOT NULL, S VARCHAR NOT NULL,
> MODEL VARCHAR CONSTRAINT pk PRIMARY KEY (ID, S)) COMPRESSION='GZ',
> BLOCKSIZE='4096'";
>
> or
>
> CREATE TABLE IF NOT EXISTS %s (ID BIGINT NOT NULL, S VARCHAR NOT NULL,
> MODEL VARCHAR CONSTRAINT pk PRIMARY KEY (ID, S)) SALT_BUCKETS=10;
>
> everything works, but not putting all options together as in the first
> example..
>
> is this a bug or there's something I cannot see?
>
> Best,
> Flavio
>
>
>
Re: Fwd: Crete table with salting and compression
Posted by "sunfl@certusnet.com.cn" <su...@certusnet.com.cn>.
Hi,
Aha, you are missing a comma after you specifying SALT_BUCKETS=10 The following sql grammer should work
CREATE TABLE IF NOT EXISTS %s
(ID BIGINT NOT NULL,
S VARCHAR NOT NULL,
MODEL VARCHAR
CONSTRAINT pk PRIMARY KEY (ID, S)) SALT_BUCKETS=10, COMPRESSION='GZ', BLOCKSIZE='4096';
CertusNet
From: Flavio Pompermaier
Date: 2015-01-30 16:01
To: user
Subject: Fwd: Crete table with salting and compression
Hi to all,
I'm using phoenix 4.2.2 and I'm trying to create a table both with compression and salting but this seems not to be possible.
Here's my SQL:
CREATE TABLE IF NOT EXISTS %s (ID BIGINT NOT NULL, S VARCHAR NOT NULL, MODEL VARCHAR CONSTRAINT pk PRIMARY KEY (ID, S)) SALT_BUCKETS=10 COMPRESSION='GZ', BLOCKSIZE='4096'";
If I do
CREATE TABLE IF NOT EXISTS %s (ID BIGINT NOT NULL, S VARCHAR NOT NULL, MODEL VARCHAR CONSTRAINT pk PRIMARY KEY (ID, S)) COMPRESSION='GZ', BLOCKSIZE='4096'";
or
CREATE TABLE IF NOT EXISTS %s (ID BIGINT NOT NULL, S VARCHAR NOT NULL, MODEL VARCHAR CONSTRAINT pk PRIMARY KEY (ID, S)) SALT_BUCKETS=10;
everything works, but not putting all options together as in the first example..
is this a bug or there's something I cannot see?
Best,
Flavio