getting error while executing sqoop job using oozie -


i'm getting error when submit sqoop job using oozie details below. please help?

my workflow.xml file

<workflow-app xmlns="uri:oozie:workflow:0.4" name="oozie-wf"> <start to="sqoop-wf1"/> <action name="sqoop-wf1"> <sqoop xmlns="uri:oozie:sqoop-action:0.2"> <job-tracker>${jobtracker}</job-tracker> <name-node>${namenode}</name-node> <command>import --username hadoop --password bigdata --connect   jdbc:db2://<host string>:50000/msrc --driver com.ibm.db2.jcc.db2driver --   query   'select * student.sales (1=0 or $conditions)' --target-dir   /user/${wf:user()}/${examplesroot}/apps/sqoop -m 1</command> </sqoop> <ok to="end"/> <error to="kill"/> </action> <kill name="kill"> <message>action failed</message> </kill> <end name="end"/> </workflow-app> 

my job.properties file

namenode=hdfs://sandbox.hortonworks.com:8020 jobtracker=sandbox.hortonworks.com:8050 queuename=default examplesroot=examples oozie.use.system.libpath=true oozie.libpath=/user/oozie/share/lib oozie.wf.application.path=${namenode}/user/root/${examplesroot}/apps/sqoop 

invoking sqoop command line >>>

3638 [main] warn org.apache.sqoop.tool.sqooptool - $sqoop_conf_dir has not been set in environment. cannot check additional configuration. 2015-10-10 05:54:21,293 warn [main] tool.sqooptool (sqooptool.java:loadpluginsfromconfdir(177)) - $sqoop_conf_dir has not been set in environment. cannot check additional configuration. 4540 [main] info org.apache.sqoop.sqoop - running sqoop version: 1.4.6.2.3.0.0-2557 2015-10-10 05:54:22,195 info [main] sqoop.sqoop (sqoop.java:(92)) - running sqoop version: 1.4.6.2.3.0.0-2557 5581 [main] warn org.apache.sqoop.tool.basesqooptool - setting password on command-line insecure. consider using -p instead. 2015-10-10 05:54:23,236 warn [main] tool.basesqooptool (basesqooptool.java:applycredentialsoptions(1021)) - setting password on command-line insecure. consider using -p instead.

recognized argument: 15582 [main] error org.apache.sqoop.tool.basesqooptool - error parsing arguments import: 2015-10-10 05:54:23,237 error [main] tool.basesqooptool (basesqooptool.java:hasunrecognizedargs(303)) - error parsing arguments import: 5582 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: * 2015-10-10 05:54:23,237 error [main] tool.basesqooptool (basesqooptool.java:hasunrecognizedargs(306)) - unrecognized argument: * 5583 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: 2015-10-10 05:54:23,238 error [main] tool.basesqooptool (basesqooptool.java:hasunrecognizedargs(306)) - unrecognized argument: 5583 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: student.sales 2015-10-10 05:54:23,238 error [main] tool.basesqooptool (basesqooptool.java:hasunrecognizedargs(306)) - unrecognized argument: student.sales 5583 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: 2015-10-10 05:54:23,238 error [main] tool.basesqooptool (basesqooptool.java:hasunrecognizedargs(306)) - unrecognized argument: 5583 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: (1=0 2015-10-10 05:54:23,238 error [main] tool.basesqooptool (basesqooptool.java:hasunrecognizedargs(306)) - unrecognized argument: (1=0 5583 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: or 2015-10-10 05:54:23,238 error [main] tool.basesqooptool (basesqooptool.java:hasunrecognizedargs(306)) - unrecognized argument: or 5583 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: $conditions)' 2015-10-10 05:54:23,238 error [main] tool.basesqooptool (basesqooptool.java:hasunrecognizedargs(306)) - unrecognized argument: $conditions)' 5583 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: --target-dir 2015-10-10 05:54:23,238 error [main] tool.basesqooptool (basesqooptool.java:hasunrecognizedargs(306)) - unrecognized argument: --target-dir 5584 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: /user/root/examples/apps/sqoop 2015-10-10 05:54:23,239 error [main] tool.basesqooptool (basesqooptool.java:hasunrecognizedargs(306)) - unrecognized argument: /user/root/examples/apps/sqoop 5584 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: -m 2015-10-10 05:54:23,239 error [main] tool.basesqooptool (basesqooptool.java:hasunrecognizedargs(306)) - unrecognized argument: -m 5584 [main] error org.apache.sqoop.tool.basesqooptool - un 2015-10-10 05:54:23,239 error [main] tool.basesqooptool (basesqooptool.java:hasunrecognizedargs(306)) - unrecognized argument: 1 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 hdfs sequence file: hdfs://sandbox.hortonworks.com:8020/user/root/oozie-root/0000035-151009124402969-oozie-root-w/sqoop-wf1--sqoop/action-data.seq 2015-10-10 05:54:23,322 info [main] zlib.zlibfactory (zlibfactory.java:(49)) - loaded & initialized native-zlib library 2015-10-10 05:54:23,323 info [main] compress.codecpool (codecpool.java:getcompressor(153)) - got brand-new compressor [.deflate]

oozie launcher ends

2015-10-10 05:54:23,346 info [main] mapred.task (task.java:done(1038)) - task:attempt_1444199299654_0255_m_000000_0 done. , in process of committing 2015-10-10 05:54:23,426 info [main] mapred.task (task.java:commit(1199)) - task attempt_1444199299654_0255_m_000000_0 allowed commit 2015-10-10 05:54:23,438 info [main] output.fileoutputcommitter (fileoutputcommitter.java:committask(482)) - saved output of task 'attempt_1444199299654_0255_m_000000_0' hdfs://sandbox.hortonworks.com:8020/user/root/oozie-root/0000035-151009124402969-oozie-root-w/sqoop-wf1--sqoop/output/_temporary/1/task_1444199299654_0255_m_000000 2015-10-10 05:54:23,509 info [main] mapred.task (task.java:senddone(1158)) - task 'attempt_1444199299654_0255_m_000000_0' done.

as sqoop trying parse whole command using java, , parse spaces mentioned below, can try below mentioned , work fine you.

try this,

<workflow-app xmlns="uri:oozie:workflow:0.4" name="oozie-wf"> <start to="sqoop-wf1"/> <action name="sqoop-wf1"> <sqoop xmlns="uri:oozie:sqoop-action:0.2"> <job-tracker>${jobtracker}</job-tracker> <name-node>${namenode}</name-node> <arg>import</arg> <arg>--connect</arg> <arg>jdbc:db2://<host string>:50000/msrc</arg> <arg>--username</arg> <arg>hadoop</arg> <arg>--password</arg> <arg>bigdata</arg> <arg>--driver</arg> <arg>com.ibm.db2.jcc.db2driver</arg> <arg>--query</arg> <arg>select * student.sales (1=0 or $conditions)</arg> <arg>--target-dir</arg> <arg>/user/${wf:user()}/${examplesroot}/apps/sqoop</arg> <arg>-m</arg> <arg>1</arg> </sqoop> <ok to="end"/> <error to="kill"/> </action> <kill name="kill"> <message>action failed</message> </kill> <end name="end"/> </workflow-app> 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -