Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Error during CREATE KUDU table using IMPALA

avatar
New Contributor

I am getting error when creating KUDU table uing IMPALA. It is on 3 machine cluister (1 is master other two are being used as Tablets). Below is the required information- 

SELECT VERSION();

Result: impalad version 2.9.0-cdh5.12.0 RELEASE (build 03c6ddbdcec39238be4f5b14a300d5c4f576097e) Built on Thu Jun 29 04:17:31 PDT 2017

CREATE SCRIPT:

CREATE TABLE my_table
(
col1 BIGINT PRIMARY KEY,
col2 STRING,
col3 BOOLEAN
) PARTITION BY HASH(col1) PARTITIONS 1  */ I have only 2 tablets/*
STORED AS KUDU;

 

Error Message:

ImpalaRuntimeException: Error creating Kudu table 'impala::impala_kudu.my_table' CAUSED BY: NonRecoverableException: must have at least two hash buckets

1 ACCEPTED SOLUTION

avatar
Expert Contributor

"PARTITIONS 1" means that you are trying to create a table with 1 hash bucket, you need at least 2 (like the error you're getting says). This is a way to force you to think about how you want to distribute your data.

 

Only 2 tservers won't work with the default replication factor of 3, as per http://kudu.apache.org/docs/known_issues.html#_tables

View solution in original post

3 REPLIES 3

avatar
Expert Contributor

"PARTITIONS 1" means that you are trying to create a table with 1 hash bucket, you need at least 2 (like the error you're getting says). This is a way to force you to think about how you want to distribute your data.

 

Only 2 tservers won't work with the default replication factor of 3, as per http://kudu.apache.org/docs/known_issues.html#_tables

avatar
New Contributor

It worked, I just made master also as a tablet.

 

Thanks for your reply.

avatar
Rising Star
This has come up a few times on mailing lists and on the Apache Kudu slack, so I'll post here too; it's worth noting that if you want a single-partition table, you can omit the PARTITION BY clause entirely. See the "Note" here: https://www.cloudera.com/documentation/enterprise/latest/topics/kudu_impala.html#concept_g51_5vk_ft