Sqoop Hive退出状态1 [英] Sqoop Hive exited with status 1

查看:506
本文介绍了Sqoop Hive退出状态1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我执行时:

  sqoop import --connect jdbc:mysql:// localhost / testdb --table test  - -hive-table test --hive-import -m 1 

我收到以下错误消息: p>

  13/04/21 16:42:50错误tool.ImportTool:遇到IOException运行导入作业:java.io.IOException:Hive退出状态1 
,位于org.apache.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:364)
at org.apache.sqoop.hive.HiveImport.executeScript(HiveImport.java:314)
在org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:226)
在org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:415)
在org.apache.sqoop.tool.ImportTool.run(ImportTool.java:476)
在org.apache.sqoop.Sqoop.run(Sqoop.java:145)
在org.apache.hadoop .util.ToolRunner.run(ToolRunner.java:65)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
at org.apache.sqoop.Sqoop.runTool( Sqoop.java:220)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
at org.apache.sqoop.Sqoop.main(Sqoop.java:238)

我试过Google,但没有找到解决方法。我以伪分布的方式在本地设置Hadoop。 Hive运行良好...我使用了嵌入式Metastore。
任何想法如何解决这个问题?
谢谢,
Diddy

解决方案

基于日志,您似乎遇到以下异常:

13/04/22 18:34:44信息hive.HiveImport:线程main中的异常java.lang.NoSuchMethodError:org.apache.thrift.EncodingUtils。 setBit(BIZ)B



在用户在不兼容版本中使用HBase和Hive之前,我已经看到过这个问题。不兼容通常可以在多个层次上进行,但是这种特殊情况是HBase和Hive使用不同的节点版本。由于Sqoop正在将HBase和Hive jar添加到classpath中,因此只有一个节点版本可以处于活动状态,因此第二个工具(通常是hive)无法正常工作。



你有没有在你正在执行Sqoop的机器上安装HBase和Hive?如果是这样,你可以检查每个项目正在使用的节俭版本吗?只需搜索* thrift * .jar。如果对这两个问题的回答都是肯定的,那么你可以将HBASE_HOME设置为不存在的东西,以强制Sqoop不加载HBase的节点版本。


When I execute:

sqoop import --connect jdbc:mysql://localhost/testdb --table test --hive-table test --hive-import -m 1 

I get following error message:

13/04/21 16:42:50 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Hive exited with status 1
    at org.apache.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:364)
    at org.apache.sqoop.hive.HiveImport.executeScript(HiveImport.java:314)
    at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:226)
    at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:415)
    at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:476)
    at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
    at org.apache.sqoop.Sqoop.main(Sqoop.java:238)

I tried to google for it but found no solution. I have Hadoop set up locally in pseudo-distributed fashion. Hive is running fine ... I used the embedded metastore. Any ideas how to fix this? Thanks, Diddy

解决方案

Based on the log it seems that you're hitting following exception:

13/04/22 18:34:44 INFO hive.HiveImport: Exception in thread "main" java.lang.NoSuchMethodError: org.apache.thrift.EncodingUtils.setBit(BIZ)B

I've seen this issue before when users were using HBase and Hive in "incompatible" versions. The incompatibility can be generally on multiple levels, but this particular one is when HBase and Hive are using different thrift versions. As Sqoop is adding both HBase and Hive jars to the classpath, only one thrift version can be active and thus the "second" tool (usually hive) is not working properly.

Do you by any chance installed both HBase and Hive on the box where you're executing Sqoop? If so, can you check the thrift version that each project is using? Just search for "*thrift*.jar". If answer to both questions is positive, then you could potentially set HBASE_HOME to something non-existing to force Sqoop not load HBase's version of thrift.

这篇关于Sqoop Hive退出状态1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆