简体   繁体   English

Cloudera Hive:失败:执行错误,从org.apache.hadoop.hive.ql.exec.mr.MapRedTask MapReduce返回代码2

[英]Cloudera Hive: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask MapReduce

I keep getting this error when trying to query data using hue FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask MapReduce 尝试使用色相查询数据时,我始终收到此错误:执行错误,从org.apache.hadoop.hive.ql.exec.mr.MapRedTask MapReduce返回代码2

From the hue job browser under the syslog tab 在Syslog标签下的色相作业浏览器中

The error log is too big to paste here http://pastebin.com/h8tgYuzR 错误日志太大,无法在此处粘贴http://pastebin.com/h8tgYuzR

Error from terminal 终端错误

hive> SELECT count(*) FROM tweets;
Query ID = cloudera_20161128145151_137efb02-413b-4457-b21d-084101b77091
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_1480364897609_0003, Tracking URL = http://quickstart.cloudera:8088/proxy/application_1480364897609_0003/
Kill Command = /usr/lib/hadoop/bin/hadoop job  -kill job_1480364897609_0003
Hadoop job information for Stage-1: number of mappers: 1; number of reducers: 1
2016-11-28 14:52:09,804 Stage-1 map = 0%,  reduce = 0%
2016-11-28 14:53:10,955 Stage-1 map = 0%,  reduce = 0%
2016-11-28 14:53:13,213 Stage-1 map = 100%,  reduce = 100%
Ended Job = job_1480364897609_0003 with errors
Error during job, obtaining debugging information...
Job Tracking URL: http://quickstart.cloudera:8088/proxy/application_1480364897609_0003/
Examining task ID: task_1480364897609_0003_m_000000 (and more) from job job_1480364897609_0003

Task with the most failures(4): 
-----
Task ID:
  task_1480364897609_0003_m_000000

URL:
  http://0.0.0.0:8088/taskdetails.jsp?jobid=job_1480364897609_0003&tipid=task_1480364897609_0003_m_000000
-----
Diagnostic Messages for this Task:
Error: java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable Objavro.schema�
    at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.map(ExecMapper.java:179)
    at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
    at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
    at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:415)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1693)
    at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing writable Objavro.schema�
    at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:505)
    at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.map(ExecMapper.java:170)
    ... 8 more
Caused by: org.apache.hadoop.hive.serde2.SerDeException: org.codehaus.jackson.JsonParseException: Unexpected character ('O' (code 79)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@7aee0989; line: 1, column: 2]
    at com.cloudera.hive.serde.JSONSerDe.deserialize(JSONSerDe.java:128)
    at org.apache.hadoop.hive.ql.exec.MapOperator$MapOpCtx.readRow(MapOperator.java:136)
    at org.apache.hadoop.hive.ql.exec.MapOperator$MapOpCtx.access$200(MapOperator.java:100)
    at org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:496)
    ... 9 more
Caused by: org.codehaus.jackson.JsonParseException: Unexpected character ('O' (code 79)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
 at [Source: java.io.StringReader@7aee0989; line: 1, column: 2]
    at org.codehaus.jackson.JsonParser._constructError(JsonParser.java:1291)
    at org.codehaus.jackson.impl.JsonParserMinimalBase._reportError(JsonParserMinimalBase.java:385)
    at org.codehaus.jackson.impl.JsonParserMinimalBase._reportUnexpectedChar(JsonParserMinimalBase.java:306)
    at org.codehaus.jackson.impl.ReaderBasedParser._handleUnexpectedValue(ReaderBasedParser.java:630)
    at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:364)
    at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2439)
    at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2396)
    at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1602)
    at com.cloudera.hive.serde.JSONSerDe.deserialize(JSONSerDe.java:126)
    ... 12 more


FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
MapReduce Jobs Launched: 
Stage-Stage-1: Map: 1  Reduce: 1   HDFS Read: 0 HDFS Write: 0 FAIL
Total MapReduce CPU Time Spent: 0 msec

Here is the table 这是桌子

CREATE EXTERNAL TABLE tweets (
   id BIGINT,
   created_at STRING,
   source STRING,
   favorited BOOLEAN,
   retweet_count INT,
   retweeted_status STRUCT<
      text:STRING,
      user:STRUCT<screen_name:STRING,name:STRING>>,
   entities STRUCT<
      urls:ARRAY<STRUCT<expanded_url:STRING>>,
      user_mentions:ARRAY<STRUCT<screen_name:STRING,name:STRING>>,
      hashtags:ARRAY<STRUCT<text:STRING>>>,
   text STRING,
   user STRUCT<
      screen_name:STRING,
      name:STRING,
      friends_count:INT,
      followers_count:INT,
      statuses_count:INT,
      verified:BOOLEAN,
      utc_offset:INT,
      time_zone:STRING>,
   in_reply_to_screen_name STRING
) 
ROW FORMAT SERDE 'com.cloudera.hive.serde.JSONSerDe'
LOCATION '/user/cloudera/flume/tweets';

data from the file I am trying to load http://pastebin.com/g7eg1BaP 我尝试加载http://pastebin.com/g7eg1BaP的文件中的数据

I have a feeling that the table was defined using AVRO as the data type but a non-avro file was loaded to the table. 我觉得该表是使用AVRO定义为数据类型,但非Avro文件已加载到该表中。

Remember that Hive is "schema on read" and not "schema on load". 请记住,Hive是“读取模式”,而不是“负载模式”。 It will check for schema only when a job is run, not during loading or defining. 仅在运行作业时(而不是在加载或定义期间),它将检查架构。

Please post the CREATE TABLE command used and a few records from the file you are trying to load. 请发布使用的CREATE TABLE命令以及您尝试加载的文件中的一些记录。

Hope this helps. 希望这可以帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Hive:失败:执行错误,从org.apache.hadoop.hive.ql.exec.mr.MapRedTask返回代码2 - Hive : FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask Hive 错误:失败:执行错误,从 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 返回代码 2 - Hive Error : FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 执行错误,从 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 返回代码 2 - Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask Hive Error on windows - return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask - Hive Error on windows - return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 执行错误,从 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 返回代码 1 (state=08S01,code=1) - Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask (state=08S01,code=1) 错误ql.Driver(SessionState.java:printError(419))-失败:执行错误,从org.apache.hadoop.hive.ql.exec.mr.MapRedTask返回代码-101 - ERROR ql.Driver (SessionState.java:printError(419)) - FAILED: Execution Error, return code -101 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask 失败:执行错误,在访问 Hive 视图时从 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 异常返回代码 2 - Getting FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask exception while access Hive views 来自 org.apache.hadoop.hive.ql.exec.mapredtask 的配置单元执行错误返回代码 2 失败 - hive failed execution error return code 2 from org.apache.hadoop.hive.ql.exec.mapredtask 查询 HiveServer2 时,Impyla 从 org.apache.hadoop.hive.ql.exec.mr.MapRedTask 返回代码 1 - Impyla return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask when querying HiveServer2 失败:执行错误,从 org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask​​ 返回代码 1 - FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM