Question

Scenario:

      I am trying for importing data from MS SQL Server to HDFS. But I am getting certain errors as:

Errors:

hadoop@ubuntu:~/sqoop-1.1.0$ bin/sqoop import --connect 'jdbc:sqlserver://localhost;username=abcd;password=12345;database=HadoopTest' --table PersonInfo
11/12/09 18:08:15 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not find appropriate Hadoop shim for 0.20.1
java.lang.RuntimeException: Could not find appropriate Hadoop shim for 0.20.1
    at com.cloudera.sqoop.shims.ShimLoader.loadShim(ShimLoader.java:190)
    at com.cloudera.sqoop.shims.ShimLoader.getHadoopShim(ShimLoader.java:109)
    at com.cloudera.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:173)
    at com.cloudera.sqoop.tool.ImportTool.init(ImportTool.java:81)
    at com.cloudera.sqoop.tool.ImportTool.run(ImportTool.java:411)
    at com.cloudera.sqoop.Sqoop.run(Sqoop.java:134)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
    at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:170)
    at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:196)
    at com.cloudera.sqoop.Sqoop.main(Sqoop.java:205)

Question:

I have configured Sqoop successfully and then what could be the problem? I am trying to connect to database by entering IP address but there is also the same problem. How can I remove these error? Pls suggest me solution.

Thanks.

Was it helpful?

Solution

Sqoop is now an incubator project in Apache. There is no reason Sqoop should only run with CDH and not Apache Hadoop.

The Sqoop documentation says Sqoop is compatible with Apache Hadoop 0.21 and Cloudera's Distribution of Hadoop version 3.. So, I think using the the correct version of Apache will also solve the problem.

SQOOP-82 is more than an year old and there had been changes after that.

FYI, Sqoop was made part of the Hadoop 0.21 branch and has been removed from Hadoop after moving it to Apache Incubator.

OTHER TIPS

Please check this issue:

Sqoop does not run with Apache Hadoop 0.20.2. The only supported platform is CDH 3 beta 2. It requires features of MapReduce not available in the Apache 0.20.2 release of Hadoop. You should upgrade to CDH 3 beta 2 if you want to run Sqoop 1.0.0.

In your sqoop import command you are missing the driver value using --driver

May be this will help.

I think you should try this one, it may solve your problem:
Add the port number of the sqlserver. For port number check with your my.conf(/etc/mysql/my.conf) file.

Try this command with port number and schema:

sqoop import --connect jdbc:mysql://localhost:3306/mydb -username root -password password --table emp --m 1

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top