Hadoop 蜂箱中减速器的选择

Hadoop 蜂箱中减速器的选择,hadoop,hive,hiveql,reduce,hadoop-partitioning,Hadoop,Hive,Hiveql,Reduce,Hadoop Partitioning,我将以下记录设置为处理 1000, 1001, 1002 to 1999, 2000, 2001, 2002 to 2999, 3000, 3001, 3002 to 3999 我想使用HIVE处理以下记录集,这样reducer-1将处理数据1000到1999,reducer-2将处理数据2000到2999,reducer-3将处理数据3000到3999。请帮助我解决上述问题。使用分发人,映射器输出根据要传输到还原器进行处理的distribute by子句进行分组: select ...

我将以下记录设置为处理

 1000, 1001, 1002 to 1999,
 2000, 2001, 2002 to 2999,
 3000, 3001, 3002 to 3999

我想使用HIVE处理以下记录集,这样reducer-1将处理数据1000到1999,reducer-2将处理数据2000到2999,reducer-3将处理数据3000到3999。请帮助我解决上述问题。

使用
分发人
,映射器输出根据要传输到还原器进行处理的distribute by子句进行分组:

select ...
  from ...
distribute by case when col between 1000 and 1999 then 1
                   when col between 2000 and 2999 then 2
                   when col between 3000 and 3999 then 3
               end
或者干脆

按楼层分发(col/1000)