此hive错误如何解决?

运行一般的hql都没有问题,
运行

select * from mall order by createtime desc;

会报错:

INFO  : Compiling command(queryId=root_20210928170420_7553da34-85e6-4b6a-a160-b2669fd22c9e): select * from mall order by createtime desc
INFO  : Concurrency mode is disabled, not creating a lock manager
INFO  : Semantic Analysis Completed (retrial = false)
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:mall.createtime, type:bigint, comment:null), FieldSchema(name:mall.goodsid, type:bigint, comment:null), FieldSchema(name:mall.userid, type:bigint, comment:null), FieldSchema(name:mall.rate, type:double, comment:null)], properties:null)
INFO  : Completed compiling command(queryId=root_20210928170420_7553da34-85e6-4b6a-a160-b2669fd22c9e); Time taken: 0.14 seconds
INFO  : Concurrency mode is disabled, not creating a lock manager
INFO  : Executing command(queryId=root_20210928170420_7553da34-85e6-4b6a-a160-b2669fd22c9e): select * from mall order by createtime desc
WARN  : 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.
INFO  : Query ID = root_20210928170420_7553da34-85e6-4b6a-a160-b2669fd22c9e
INFO  : Total jobs = 1
INFO  : Launching Job 1 out of 1
INFO  : Starting task [Stage-1:MAPRED] in serial mode
INFO  : Number of reduce tasks determined at compile time: 1
INFO  : In order to change the average load for a reducer (in bytes):
INFO  :   set hive.exec.reducers.bytes.per.reducer=<number>
INFO  : In order to limit the maximum number of reducers:
INFO  :   set hive.exec.reducers.max=<number>
INFO  : In order to set a constant number of reducers:
INFO  :   set mapreduce.job.reduces=<number>
INFO  : number of splits:1
INFO  : Submitting tokens for job: job_local1588729876_0012
INFO  : Executing with tokens: []
INFO  : The url to track the job: http://localhost:8080/
INFO  : Job running in-process (local Hadoop)
INFO  : 2021-09-28 17:04:21,627 Stage-1 map = 0%,  reduce = 0%
ERROR : Ended Job = job_local1588729876_0012 with errors
ERROR : FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
INFO  : MapReduce Jobs Launched: 
INFO  : Stage-Stage-1:  HDFS Read: 0 HDFS Write: 0 FAIL
INFO  : Total MapReduce CPU Time Spent: 0 msec
INFO  : Completed executing command(queryId=root_20210928170420_7553da34-85e6-4b6a-a160-b2669fd22c9e); Time taken: 1.266 seconds
INFO  : Concurrency mode is disabled, not creating a lock manager
Error: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask (state=08S01,code=2)

查了很多资料 都没能解决

谢谢大牛

阅读 7k
2 个回答

已经有 JobId 了就去 YARN 里查一下任务调度日志吧,里面会有更详细的错误信息。

"state=08S01, code=2" 一般是内存爆了,具体哪溢出了看日志吧。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题