FAILED: Execution Error, return code 2 from org.apache.hadoop

错误遇到的情形:
hive整合hbase,hive的数据表 load,select,insert一切正常

通过hive往hbase关联表插入数据的时候报错,错误内容如下:
2016-04-18 14:00:34,721 Stage-0 map = 0%,  reduce = 0%
2016-04-18 14:00:56,491 Stage-0 map = 100%,  reduce = 0%
Ended Job = job_1460958898158_0001 with errors
Error during job, obtaining debugging information...
Job Tracking URL: http://master.hadoop:8088/proxy/application_1460958898158_0001/
Examining task ID: task_1460958898158_0001_m_000000 (and more) from job job_1460958898158_0001

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

URL:
  http://master.hadoop:8088/taskdetails.jsp?jobid=job_1460958898158_0001&tipid=task_1460958898158_0001_m_000000
-----
Diagnostic Messages for this Task:
Error: java.lang.RuntimeException: Error in configuring object
at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:106)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:72)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:130)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:424)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:340)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:157)
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:1408)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:152)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:103)
... 9 more
Caused by: java.lang.RuntimeException: Error in configuring object
at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:106)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:72)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:130)
at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:38)
... 14 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.ReflectionUtils.setJobConf(ReflectionUtils.java:103)
... 17 more
Caused by: java.lang.RuntimeException: Map operator initialization failed
at org.apache.hadoop.hive.ql.exec.ExecMapper.configure(ExecMapper.java:121)
... 22 more
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.NullPointerException
at org.apache.hadoop.hive.ql.exec.FileSinkOperator.initializeOp(FileSinkOperator.java:373)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:360)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:436)
at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:392)
at org.apache.hadoop.hive.ql.exec.SelectOperator.initializeOp(SelectOperator.java:62)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:360)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:436)
at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:392)
at org.apache.hadoop.hive.ql.exec.TableScanOperator.initializeOp(TableScanOperator.java:166)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:360)
at org.apache.hadoop.hive.ql.exec.MapOperator.initializeOp(MapOperator.java:441)
at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:360)
at org.apache.hadoop.hive.ql.exec.ExecMapper.configure(ExecMapper.java:98)
... 22 more
Caused by: java.lang.NullPointerException
at org.apache.hadoop.hive.ql.exec.FileSinkOperator.initializeOp(FileSinkOperator.java:315)
... 34 more

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

解决办法:hive-env.sh  加入
export HADOOP_HEAPSIZE=1024
export HIVE_AUX_JARS_PATH=/opt/hadoop/hive/lib/hive-hbase-handler-0.10.0-cdh4.2.2.jar,/opt/hadoop/hive/lib/hbase-0.94.2-cdh4.2.2.jar,/opt/hadoop/hive/lib/zookeeper-3.4.5-cdh4.2.2.jar

hive-site.xml 加入
hive.aux.jars.path
file:///opt/hadoop/hive/lib/hive-hbase-handler-0.10.0-cdh4.2.2.jar,file:///opt/hadoop/hive/lib/hbase-0.94.2-cdh4.2.2-security.jar,file:///opt/hadoop/hive/lib/zookeeper-3.4.5-cdh4.2.2.jar

再次测试,解决!
时间: 2024-10-10 18:02:07

FAILED: Execution Error, return code 2 from org.apache.hadoop的相关文章

解决hiveserver2报错:java.io.IOException: Job status not available - Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

用户使用的sql: select count( distinct patient_id ) from argus.table_aa000612_641cd8ce_ceff_4ea0_9b27_0a3a743f0fe3; 下面做不同的测试: 1.beeline -u jdbc:hive2://0.0.0.0:10000 -e "select count( distinct patient_id ) from argus.table_aa000612_641cd8ce_ceff_4ea0_9b27_

FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask

我们采用亚马逊emr构建的集群,用hive查询的时候报错,FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.tez.TezTask,查看了下面的参数,挺有帮助的 Tez内存优化 1.AM.Container大小设置 tez.am.resource.memory.mb 参数说明:Set tez.am.resource.memory.mb tobe the same as yarn.scheduler

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

hive启动后,出现以下异常 hive> show databases; FAILED: Error in metadata: MetaException(message:Got exception: java.net.ConnectException Call to centos7-01/192.168.146.135:9000 failed on connection exception: java.net.ConnectException: Connection refused) FAIL

Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask.

HIVE创建表时,出现以下错误: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:For direct MetaStore DB connections, we don't support retries at the client level.) 解决方案: 这是由于字符集的问题,需要配置MySQL的字符集: mysql> alter databa

hive报错 Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:For direct MetaStore DB connections,

学习hive 使用mysql作为元数据  hive创建数据库和切换数据库都是可以的 但是创建表就是出问题 百度之后发现 是编码问题 特别记录一下~~~ 1.报错前如图: 2.在mysql数据库中执行如下: 1 ALTER DATABASE hive CHARACTER SET latin1; 3.修改编码后创建数据库成功:

hive中删除表的错误Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException

1:请看操作 [[email protected] hive-0.12.0-bin]$ hive Logging initialized using configuration in jar:file:/home/jifeng/hadoop/hive-0.12.0-bin/lib/hive-common-0.12.0.jar!/hive-log4j.properties hive> show tables; OK t1 tianq tianqi Time taken: 3.338 seconds

Hive创建表格报【Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException】引发的血案

在成功启动Hive之后感慨这次终于没有出现Bug了,满怀信心地打了长长的创建表格的命令,结果现实再一次给了我一棒,报了以下的错误Error, return code 1 from org.apache.Hadoop.hive.ql.exec.DDLTask. MetaException,看了一下错误之后,先是楞了一下,接着我就发出感慨,自从踏上编程这条不归路之后,就没有一天不是在找Bug的路上就是在处理Bug,给自己贴了个标签:找Bug就跟吃饭一样的男人.抒发心中的感慨之后,该干活还是的干活.

Error, return code 1 from org.apache.hadoop.hive.

Hive创建表格报[Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException]这个错误: 可能是字符集的原因,可以通过在mysql中将数据库的字符集改为latin1,执行以下命令: alter database hive character set latin1 接着在mysql中执行以下命令: drop database hive; create database hive; alter da

关于HIVE做MapReduce报错:return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

大部分人没有交换分区的问题. 因为在做Linux的时候交换分区是按照内存的2倍来做的.但是我的是用VM快速装机做的.所以交换分区被设置成了等于内存. 扩展交换分区:https://blog.csdn.net/Ares_song/article/details/81203251 永久添加该文件:https://blog.csdn.net/kai_wei/article/details/53582811 另外MYSQL一个重复IP连接问题可能导致HIVE初始化实例失败,需要在所在用户执行:https