Support Questions

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

Is there any relation of no of buckets with number of reducers? are both should be equal in hive?

avatar
Expert Contributor
 
1 ACCEPTED SOLUTION

avatar
Expert Contributor

The command set hive.enforce.bucketing = true; allows the correct number of reducers and the cluster by column to be automatically selected based on the table. Otherwise, you would need to set the number of reducers to be the same as the number of buckets.

View solution in original post

3 REPLIES 3

avatar
Explorer

As per hive documentation what you have specified at the time of creation of bucket table with no.of buckets is become the number of reducers.If you have huge data single file contains different data.

https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL+BucketedTables

avatar
Expert Contributor

@ thanks Kazan, there is bit correction with your ans,The command set hive.enforce.bucketing = true; allows the correct number of reducers and the cluster by column to be automatically selected based on the table. Otherwise, you would need to set the number of reducers to be the same as the number of buckets.

avatar
Expert Contributor

The command set hive.enforce.bucketing = true; allows the correct number of reducers and the cluster by column to be automatically selected based on the table. Otherwise, you would need to set the number of reducers to be the same as the number of buckets.