1

我正在使用 cdh3u5 压缩包。我已经创建了 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>

但后来我也面临同样的问题。请指导我,因为我是新手。提前致谢。

4

0 回答 0