分享

执行sqoop 时,报错

释怀 发表于 2017-6-21 11:46:34 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 3 11861
本帖最后由 释怀 于 2017-6-21 11:51 编辑

在hue 执行sqoop 时报错,使用场景:我将编写好的sqoop 脚本(在liunx 命令是可以正常执行的),打算放在hue的workflows 下执行,但是报如下错误,
>>> Invoking Sqoop command line now >>>

2017-06-21 11:38:00,125 [main] WARN  org.apache.sqoop.tool.SqoopTool  - $SQOOP_CONF_DIR has not been set in the environment. Cannot check for additional configuration.

<<< Invocation of Sqoop command completed <<<

No child hadoop job is executed.
Intercepting System.exit(1)

<<< Invocation of Main class completed <<<

Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.SqoopMain], exit code [1]

已有(3)人评论

跳转到指定楼层
sstutu 发表于 2017-6-21 12:09:29
很多人遇到这种问题。可以调试下。
$SQOOP_CONF_DIR 这个没有可以加上。
可以先尝试环境变量,不行的话,hue里面直接定义应该也可以
回复

使用道具 举报

释怀 发表于 2017-6-21 14:55:48
sstutu 发表于 2017-6-21 12:09
很多人遇到这种问题。可以调试下。
$SQOOP_CONF_DIR 这个没有可以加上。
可以先尝试环境变量,不行的话 ...

感谢解答!我还不是很明白, 请问一下,$SQOOP_CONF_DIR  这个去哪配置呢?  我同一台机器,命令模令是可以正常运行的。
回复

使用道具 举报

qcbb001 发表于 2017-6-21 15:11:42
释怀 发表于 2017-6-21 14:55
感谢解答!我还不是很明白, 请问一下,$SQOOP_CONF_DIR  这个去哪配置呢?  我同一台机器,命令模令是可 ...

shell里面能执行,hue里面可能不可以。下面说了shell和hue的区别

When you are executing Sqoop using shell (for example Bash or ZSH), you need to manually escape the arguments, so that the shell won't alter them. In your example you've put the JDBC URL into quotes, so that the semicolon won't be interpreted as end of the command. As Oozie is not using shell for calling Sqoop, those escape characters are not valid. Therefore you should remove the escaping introduced for the shell in the oozie workflow.
https://stackoverflow.com/questions/16906973/oozie-sqoop-job

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条