解决org.apache.sqoop.hive.HiveImport - Loading uploaded data into Hive Intercepting System.exit(1)

在 HUE 的 作业设计器中 运行sqoop 作业,调用命令:

sqoop import --connect jdbc:mysql://localhost:3306/test --username root --password mysql-password --table t1 --hive-import

时报错,错误如下:

 
  33782 [main] INFO  org.apache.sqoop.hive.HiveImport  - Loading uploaded data into Hive
  Intercepting System.exit(1)
  
  <<< Invocation of Main class completed <<<
  
  Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.SqoopMain], exit code [1]
  
  Oozie Launcher failed, finishing Hadoop job gracefully
  
  Oozie Launcher, uploading action data to HDFS sequence file: hdfs://rhel072:8020/user/admin/oozie-oozi/0000003-141029091352918-oozie-oozi-W/mysqlTableData2hive--sqoop/action-data.seq
  
  Oozie Launcher ends

分析发现 数据再导入hdfs的时候成功了,但是在往 hive 写数据的时候中断了,这里找到的解决办法如下

  1. Hive metastore service is not running. It should be running in remote mode and a separate service should be started. Here's a quick way to check if its running:
    service hive-metastore status
  1. hive-site.xml does not contain hive.metastore.uris. Here's an example hive-site.xml with hive.metastore.uris set:
<configuration>
...
  <property>
    <name>hive.metastore.uris</name>
    <value>thrift://sqoop2.example.com:9083</value>
  </property>
...
</configuration>
  1.  
  2. hive-site.xml is not included in your Sqoop action (or its properties). Try adding your hive-site.xml to a <file> element in your Sqoop action. Here's an example workflow.xml with <file>in it:
    <workflow-app name="sqoop-to-hive" xmlns="uri:oozie:workflow:0.4">
        ...
        <action name="sqoop2hive">
            ...
            <sqoop xmlns="uri:oozie:sqoop-action:0.2">
                ...
                <file>/tmp/hive-site.xml#hive-site.xml</file>
            </sqoop>
            ...
        </action>
        ...
    </workflow-app>



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值