HUE使用错误本

1,提交 Workflow query-sqoop1 批作业 时出错:E0803: IO error, E0603: SQL error in operation, The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.

使用HUE提交sqoop脚本通过sqoop将hive表数据导入到mysql时报错:

提交 Workflow query-sqoop1 批作业 时出错:E0803: IO error, E0603: SQL error in operation, The transaction has been rolled back. See the nested exceptions for details on the errors that occurred.

原因是在hue执行命令时直接使用二级命令在终端执行

sqoop-import \
  -D org.apache.sqoop.splitter.allow_text_splitter=true \
  --connect jdbc:postgresql://postgresql_server:3306/test \
  --username username \
  --password password \
  -m 6 \
  --table user \
  --columns id,name \
  --delete-target-dir \
  --target-dir /user/bigdata/sqoop_import_test/postgresql/user

在Hue中执行

import -D org.apache.sqoop.splitter.allow_text_splitter=true --connect jdbc:postgresql://postgresql_server:3306/test --username username --password password -m 6 --table user --columns id,name --delete-target-dir --target-dir /user/bigdata/sqoop_import_test/postgresql/user
区别点终端Hue
命令sqoop-importimport
换行使用反斜杠()换行不可换行

2,查看oozie日志

oozie job -log 0000003-191226020256021-oozie-oozi-W

3,hue执行shell脚本报错:Main Class [org.apache.oozie.action.hadoop.ShellMain], exit code [1]

原因是执行命令时要使用命令的全路径,不能识别环境变量,也不能用软连接。

#!/bin/bash
/etc/alternatives/sqoop export  \
--connect "jdbc:mysql://192.168.52.150:3306/scrm_bi?useUnicode=true&characterEncoding=utf-8" \
--username root \
--password '123456' \
--table itcast_visit \
--hcatalog-database itcast_dws \
--hcatalog-table visit_dws \
-m 100
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小手追梦

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值