sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DIPESH KUMAR SINGH <dipesh.t...@gmail.com>
Subject Error while importing from Teradata to HDFS
Date Sun, 22 Apr 2012 05:21:29 GMT
I am trying to import the data from Teradata to hdfs referring Cloudera
Connector guide. I added the property

(The Hadoop environment i am working in is a shared Hadoop installation, So
users are not allowed to
add any jars in lib directory or make changes in Sqoop-site.xml of central
installation.
However, users can use .profile i.e. user's configuration files to specify
CLASSPATH )

I added the line com.teradata.jdbc.TeraDriver=<path to jar file
terajdbc4.jar> along with
com.cloudera.sqoop.manager.TeradataManagerFactory=<path to
sqoop-td-connector-1.0.5.jar>
in connectors file inside managers.d directory. In my CLASSPATH, i have
added path to
SQOOP_CONF i.e. a Sqoop folder where i have kept my managers.d and all
jars.


With these I suppose i am able to connect to teradata using the teradata
manager factory using the teradriver as well
but, still i am facing this when i issue the sqoop import command as below

sqoop import
-libjars <path to tdgssconfig.jar>
--driver com.teradata.jdbc.TeraDriver
--connect jdbc:teradata://xxxxxx/DATABASE=dbname
--username hadoop --P
--table SQOOP_TEST
--num-mappers 3 --verbose

12/04/13 02:29:32 DEBUG tool.BaseSqoopTool: Enabled debug logging.
12/04/13 02:29:32 WARN tool.BaseSqoopTool: Setting your password on the
command-line is insecure. Consider using -P instead.
12/04/13 02:29:32 DEBUG util.ClassLoaderStack: Checking for existing class:
com.cloudera.sqoop.manager.TeradataManagerFactory
12/04/13 02:29:32 DEBUG util.ClassLoaderStack: Attempting to load jar
through URL: jar:file:///Sqoop/sqoop-td-connector-1.0.5.jar!/
12/04/13 02:29:32 DEBUG util.ClassLoaderStack: Previous classloader is
java.net.URLClassLoader@6a8c436b
12/04/13 02:29:32 DEBUG util.ClassLoaderStack: Testing class in jar:
com.cloudera.sqoop.manager.TeradataManagerFactory
12/04/13 02:29:32 DEBUG util.ClassLoaderStack: Loaded jar into current JVM:
jar:file:///Sqoop/sqoop-td-connector-1.0.5.jar!/
12/04/13 02:29:32 DEBUG util.ClassLoaderStack: Added classloader for jar
/Sqoop/sqoop-td-connector-1.0.5.jar: java.net.FactoryURLClassLoader@45db05b2
12/04/13 02:29:32 DEBUG sqoop.ConnFactory: Added factory
com.cloudera.sqoop.manager.TeradataManagerFactory in jar
/Sqoop/sqoop-td-connector-1.0.5.jar specified by
/Sqoop/conf/managers.d/connectors
12/04/13 02:29:32 DEBUG util.ClassLoaderStack: Checking for existing class:
com.teradata.jdbc.TeraDriver
12/04/13 02:29:32 DEBUG util.ClassLoaderStack: Attempting to load jar
through URL: jar:file:///Sqoop/lib/terajdbc4.jar!/
12/04/13 02:29:32 DEBUG util.ClassLoaderStack: Previous classloader is
java.net.FactoryURLClassLoader@45db05b2
12/04/13 02:29:32 DEBUG util.ClassLoaderStack: Testing class in jar:
com.teradata.jdbc.TeraDriver
12/04/13 02:29:32 DEBUG util.ClassLoaderStack: Loaded jar into current JVM:
jar:file:///Sqoop/lib/terajdbc4.jar!/
12/04/13 02:29:32 DEBUG util.ClassLoaderStack: Added classloader for jar
/Sqoop/lib/terajdbc4.jar: java.net.FactoryURLClassLoader@518f5824
12/04/13 02:29:32 DEBUG sqoop.ConnFactory: Added factory
com.teradata.jdbc.TeraDriver in jar /Sqoop/lib/terajdbc4.jar specified by
/Sqoop/conf/managers.d/connectors
12/04/13 02:29:32 DEBUG sqoop.ConnFactory: Loaded manager factory:
com.cloudera.sqoop.manager.TeradataManagerFactory
12/04/13 02:29:32 ERROR tool.BaseSqoopTool: Got error creating database
manager: java.lang.ClassCastException: com.teradata.jdbc.TeraDriver cannot
be cast to com.cloudera.sqoop.manager.ManagerFactory
at com.cloudera.sqoop.ConnFactory.instantiateFactories(ConnFactory.java:90)
at com.cloudera.sqoop.ConnFactory.<init>(ConnFactory.java:60)
at com.cloudera.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:186)
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:144)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at com.cloudera.sqoop.Sqoop.runSqoop(Sqoop.java:180)
at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:219)
at com.cloudera.sqoop.Sqoop.runTool(Sqoop.java:228)
at com.cloudera.sqoop.Sqoop.main(Sqoop.java:237)


Please help.

Thanks & Regards,
-- 
Dipesh Kr. Singh

Mime
View raw message