如何在azure hdinsight(远程机器)中使用oozie计划sqoop作业命令

时间:2014-06-26 11:15:36

标签: azure sqoop oozie hdinsight

我正在尝试使用hdinsight(远程计算机)中的oozie计划sqoop作业。我已经在cmd中执行了sqoop job命令,并尝试安排" job --exec job1"在oozie。但这不起作用。我看到azure blob和oozie日志中的日志没有错误。我看到纱线应用程序成功,oozie显示失败/被杀1错误。

如果我在cmd中运行相同的命令,它运行良好。

This is my sqoop job command :

sqoop job --create job1  -- import --connect "jdbc:sqlserver://<ip:port>;database=<dbname>;username=<name>;password=<pwd>" --table tablename --target-dir /example/sqoopoutput --incremental append --check-column latestdate --last-value "1991-01-01 00:00:00.000"

I am getting this error :

[org.apache.oozie.action.hadoop.SqoopMain], exit code [1]

我尝试使用sqoop和oozie共享lib jar中的所有jar文件。

1 个答案:

答案 0 :(得分:0)

在oozie中调度sqoop作业时,你不会在你传递的日期值中留空,而不是空间使用T

按如下方式更改命令:

job --create job1  -- import --connect "jdbc:sqlserver://<ip:port>;database=<dbname>;username=<name>;password=<pwd>" --table tablename --target-dir /example/sqoopoutput --incremental append --check-column latestdate --last-value "1991-01-01T00:00:00.000"