我正在使用cdh3u5 tarball。我创建了Hive外部表来查询Hbase。我能够做简单的选择查询,如。
select * from hbase_tab;
但是当查询使用mapper和reducer时,它会失败。这是我得到的。
hive> select count(*) from hbase_tab;
Total MapReduce jobs = 1
Launching Job 1 out of 1
Number of reduce tasks determined at compile time: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
set mapred.reduce.tasks=<number>
Starting Job = job_201211121409_0030, Tracking URL = http://10.3.3.333:50030/jobdetails.jsp?jobid=job_201211121409_030
Kill Command = /home/hadoop/hadoop/bin/hadoop job -Dmapred.job.tracker=10.3.3.333:9001 -kill job_201211121409_030
2012-11-21 10:19:28,150 Stage-1 map = 0%, reduce = 0%
2012-11-21 10:20:03,564 Stage-1 map = 100%, reduce = 100%
Ended Job = job_201211121409_0030 with errors
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask
我试过在number
字段中给出了一些数字。
set hive.exec.reducers.bytes.per.reducer=<number>
set hive.exec.reducers.max=<number>
set mapred.reduce.tasks=<number>
但是我也遇到了同样的问题。请指导我,因为我是新手。提前谢谢。