Support Questions

Find answers, ask questions, and share your expertise

oozie with hive and sqoop action

New Contributor

Hi All,

I am trying to run sqoop action using oozie workflow. But i am facing issue while running the script. can you please help to find out the issue. Thanks!

Sqoop action error:- Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.SqoopMain], exit code [1]

Here is the script details:-

Workflow:-

<workflow-app xmlns = "uri:oozie:workflow:0.4" name = "simple-Workflow">
<global>
   <job-tracker>${jobTracker}</job-tracker>
   <name-node>${nameNode}</name-node>
   <configuration>
        <property>
          <name>mapred.job.queue.name</name>
          <value>${queueName}</value>
        </property>
    </configuration>
</global>
<start to="sample_sqoop" />
    <action name="sample_sqoop">
        <sqoop xmlns="uri:oozie:sqoop-action:0.2">
        <job-tracker>${jobTracker}</job-tracker>
        <name-node>${nameNode}</name-node>
            <arg>export</arg>
            <arg>-HADOOP_CLASSPATH=$HADOOP_CLASSPATH:/var/lib/sqoop/ojdbc6.jar</arg>
            <arg>--connect</arg>
            <arg>${oracle_database}</arg>
            <arg>--table</arg>
            <arg>${oracle_table}</arg>
            <arg>--export-dir</arg>
            <arg>${RESULTS_FOLDER}</arg>
            <arg>--input-fields-terminated-by</arg>
            <arg>\x01</arg>
            <arg>--input-lines-terminated-by</arg>
            <arg>'\n'</arg>
            <arg>--username</arg>
            <arg>${oracle_username}</arg>
            <arg>--password</arg>
            <arg>${oracle_password}</arg>
            <arg>--m</arg>
            <arg>${num_mappers}</arg>
        </sqoop>
        <ok to="end" />
        <error to="kill" />
    </action>
    <kill name="kill">
    <message>Action failed, error
        message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end" />
</workflow-app>

job.Properties:-

nameNode=hdfs://arun
jobTracker=edllbphmg02.arun.com:8050
queueName=default
oozie.use.system.libpath=true
oozie.libpath=${nameNode}/user/oozie/share/lib
oozie.wf.application.path=${nameNode}/user/arun/workflow.xml
num_mappers=1
RESULTS_FOLDER=${nameNode}/apps/hive/warehouse/Emp_table
oracle_database=jdbc:oracle:thin:@10.190.142.86:1521/database
oracle_table=test.Emp_table
oracle_username=XXXXXXXXXXXXXXX
oracle_password=XXXXXXXXXXXXXXX
2 REPLIES 2

Explorer

Did you resolve this issue? I am facing the same problem.

Expert Contributor

Hi,


Can you please share the oozie launcher logs?

 

I am worried the --hadoop-classpath you are passing is not correct.

 

Regrads

Nitish