AnsweredAssumed Answered

Get "findJobTrackerAddr: NoNodeFound" while trying to run Sqoop in Java

Question asked by ryansun on Jun 19, 2016
Latest reply on Sep 19, 2016 by Rachel Silver

Hi Guys,

 

 

I would like to run Sqoop to import data from Oracle to Hive with Java API. I can hardly find document about this and I tried a solution after I googled but it didn't work.

 

ENV

MapR 5.1.0.37549.GA.

Hadoop 2.7.0

 

Error Message

19580 06-20 06:01:42,275[main] com.mapr.fs.JobTrackerWatcher.findJobTrackerAddr(JobTrackerWatcher.java:148)     - findJobTrackerAddr: NoNodeFound, Retrying... Current ZooKeeper Server: ... ...

 

The MapReduce is set in Yarn mode but the I don't know why the Sqoop is looking for job tracker. Below is my code.

 

 

Code

SqoopOptions options = new SqoopOptions();

        options.setConnectString(url);

       

        options.setUsername(username);

        options.setPassword(password);

        options.setHiveTableName(hiveTable);

        options.setSqlQuery(query);

        options.setSplitByCol(splitBy);

        options.setTargetDir(targetDir);

        options.setNullStringValue(nullString);

        options.setNullNonStringValue(nullNonString);

        options.setJobName("Sqoop Hive Import Job");

 

        ImportTool tool = new ImportTool();

        int ret = tool.run(options);

        if(ret == 0) {

        logger.info("Import successfully");

        } else {

        logger.info("Import failed");

        }

 

Please kindly help me to resolve this problem.

It would be great if a working example code is provided.

 

Thank you very much.

 

 

Best regards,

Ryan

Outcomes