Support Questions

Find answers, ask questions, and share your expertise

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

Rising Star
 
1 ACCEPTED SOLUTION

Rising Star

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

New Contributor

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

Rising Star

@ 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.

Rising Star

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.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.