Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HDP 3.0.1 - Error when selecting rows: : java.lang.IllegalArgumentException: bucket Id out of range: -1

HDP 3.0.1 - Error when selecting rows: : java.lang.IllegalArgumentException: bucket Id out of range: -1

New Contributor

All is in the title :)

When I do a select count(*) .... or select distinct <field> ... for instance, no problem.
But a select * from..... or select <field> from.... fails with this error. Any clues??

I'm in Sandbox

3 REPLIES 3

Re: HDP 3.0.1 - Error when selecting rows: : java.lang.IllegalArgumentException: bucket Id out of range: -1

Expert Contributor

Is this a managed or external table? If managed, do you have any files in the table that don't match 0000_0, 0000_0_copy_1 or bucket_0 pattern?

Re: HDP 3.0.1 - Error when selecting rows: : java.lang.IllegalArgumentException: bucket Id out of range: -1

New Contributor

@Eugene Koifman managed table. format of the 2 files in there (small table for test) is
part0-00000-0000-......-c000.snappy.orc and
part1-00000-0000-......-c000.snappy.orc

Btw, I'm not creating it in hive - but from spark in zeppelin.

Re: HDP 3.0.1 - Error when selecting rows: : java.lang.IllegalArgumentException: bucket Id out of range: -1

Expert Contributor

The contents of a managed table should be manage by Hive, you cannot just write files there. To do that you have to use External table. To add data to a managed table you should use Insert or Load Data or some other Hive command, but not just drop files there.