title: Cloudera Hive: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask MapReduce
body: <p>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 </p>
  
  <p>From the hue job browser under the syslog tab</p>
  
  <p>The error log is too big to paste here 
  <a href="http://pastebin.com/h8tgYuzR" rel="nofollow noreferrer">http://pastebin.com/h8tgYuzR</a></p>
  
  <p>Error from terminal</p>
  
  <pre><code>hive&gt; 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=&lt;number&gt;
  In order to limit the maximum number of reducers:
    set hive.exec.reducers.max=&lt;number&gt;
  In order to set a constant number of reducers:
    set mapreduce.job.reduces=&lt;number&gt;
  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&amp;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
  </code></pre>
  
  <p>Here is the table </p>
  
  <pre><code>CREATE EXTERNAL TABLE tweets (
     id BIGINT,
     created_at STRING,
     source STRING,
     favorited BOOLEAN,
     retweet_count INT,
     retweeted_status STRUCT&lt;
        text:STRING,
        user:STRUCT&lt;screen_name:STRING,name:STRING&gt;&gt;,
     entities STRUCT&lt;
        urls:ARRAY&lt;STRUCT&lt;expanded_url:STRING&gt;&gt;,
        user_mentions:ARRAY&lt;STRUCT&lt;screen_name:STRING,name:STRING&gt;&gt;,
        hashtags:ARRAY&lt;STRUCT&lt;text:STRING&gt;&gt;&gt;,
     text STRING,
     user STRUCT&lt;
        screen_name:STRING,
        name:STRING,
        friends_count:INT,
        followers_count:INT,
        statuses_count:INT,
        verified:BOOLEAN,
        utc_offset:INT,
        time_zone:STRING&gt;,
     in_reply_to_screen_name STRING
  ) 
  ROW FORMAT SERDE 'com.cloudera.hive.serde.JSONSerDe'
  LOCATION '/user/cloudera/flume/tweets';
  </code></pre>
  
  <p>data from the file I am trying to load <a href="http://pastebin.com/g7eg1BaP" rel="nofollow noreferrer">http://pastebin.com/g7eg1BaP</a></p>