Details
Description
Here is what i found
CREATE TABLE IF NOT EXISTS table1(a BIGINT NOT NULL, b BIGINT NOT NULL CONSTRAINT PK PRIMARY KEY (a, b)) TTL=7776000, NORMALIZATION_ENABLED=true, SALT_BUCKETS=16, DISABLE_TABLE_SOR=true, NORMALIZER_TARGET_REGION_SIZE=5200;
Error: ERROR 1147 (42Y86): Should not enable normalizer on salted table. tableName=TABLE1 (state=42Y86,code=1147)
java.sql.SQLException: ERROR 1147 (42Y86): Should not enable normalizer on salted table. tableName=TABLE1
at org.apache.phoenix.exception.SQLExceptionCode$Factory$1.newException(SQLExceptionCode.java:618)
at org.apache.phoenix.exception.SQLExceptionInfo.buildException(SQLExceptionInfo.java:228)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1462)
at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1983)
at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:3094)
at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1118)
at org.apache.phoenix.compile.CreateTableCompiler$CreateTableMutationPlan.execute(CreateTableCompiler.java:421)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:516)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:482)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:481)
at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:469)
at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:2036)
at sqlline.Commands.execute(Commands.java:814)
at sqlline.Commands.sql(Commands.java:754)
0: jdbc:phoenix:localhost:50141> CREATE TABLE IF NOT EXISTS table1(a BIGINT NOT NULL, b BIGINT NOT NULL CONSTRAINT PK PRIMARY KEY (a, b)) TTL=7776000, NORMALIZATION_ENABLED=false, SALT_BUCKETS=16, DISABLE_TABLE_SOR=true, NORMALIZER_TARGET_REGION_SIZE=5200;
No rows affected (2.295 seconds)
0: jdbc:phoenix:localhost:50141> ALTER TABLE table1 set NORMALIZATION_ENABLED=true;
No rows affected (1.374 seconds)
So basically we are still able to set the normalization if we go through the alter table.
Attachments
Issue Links
- causes
-
PHOENIX-6952 Do not disable normalizer on salted tables
- Resolved
- is related to
-
PHOENIX-6586 Set NORMALIZATION_ENABLED to false on salted tables
- Resolved
- relates to
-
PHOENIX-6587 Handle explicit pre-splits for new salted tables and validate splits when creating salted tables on existing HBase tables
- Resolved
- links to