JavaEar 专注于收集分享传播有价值的技术资料

Stage-Stage-1: HDFS Read: 0 HDFS Write: 0 FAIL

I install hive with tutorial: https://www.edureka.co/blog/apache-hive-installation-on-ubuntu And some other.

I create database, table, load data is succes but another is error with map/ reduce task

hive> create database mydb;
enter code here
OK
Time taken: 0.366 seconds
hive> CREATE TABLE IF NOT EXISTS employee ( eid int, name String,
    > salary String, destination String)
    > COMMENT 'Employee details'
    > ROW FORMAT DELIMITED
    > FIELDS TERMINATED BY '\t'
    > LINES TERMINATED BY '\n'
    > STORED AS TEXTFILE;
OK
Time taken: 0.695 seconds
hive> LOAD DATA LOCAL INPATH '/home/hduser/sample.txt'
    > OVERWRITE INTO TABLE employee;
Loading data to table default.employee
OK
Time taken: 1.662 seconds
hive> select count(*) from employee;
WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
Query ID = hduser_20170929160939_b7499547-27d4-4989-b7de-20d41d9b4987
Total 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 mapreduce.job.reduces=<number>
Starting Job = job_1506674663137_0001, Tracking URL = http://khanhpc-ThinkPad-X220:8088/proxy/application_1506674663137_0001/
Kill Command = /usr/local/hadoop/bin/hadoop job  -kill job_1506674663137_0001
Hadoop job information for Stage-1: number of mappers: 0; number of reducers: 0
2017-09-29 16:09:49,375 Stage-1 map = 0%,  reduce = 0%
Ended Job = job_1506674663137_0001 with errors
Error during job, obtaining debugging information...
Job Tracking URL: http://khanhpc-ThinkPad-X220:8088/cluster/app/application_1506674663137_0001
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
MapReduce Jobs Launched: 
Stage-Stage-1:  HDFS Read: 0 HDFS Write: 0 FAIL
Total MapReduce CPU Time Spent: 0 msec

1个回答

    最佳答案
  1. Thank for everyone. I lost 1 week for this bug. Just by mistake version.
    1) Hadoop 3.x.x dont support hive 1.x.x
    2) hive command dont support in hive 2.x.x. It use beeline command
    I run beeline command in hive 2.3.0 and install hadoop 2.8.0. Everything ok