All Forums Connectivity
ranjans 3 posts Joined 08/11
08 Aug 2011
JDBC driver for Teradata issue

I am new to Teradata. I am using Hadoop Java map-reduce to connect to Teradata via JDBC. I am using the Teradata JDBC Driver 13. I am using Hadoop 20.2.

I am gettign the following stack trace.

11/08/08 14:51:42 INFO mapred.JobClient: Task Id : attempt_201106221259_0073_m_000010_0, Status : FAILED
java.io.IOException: com.teradata.jdbc.TeraDriver
at org.apache.hadoop.mapred.lib.db.DBOutputFormat.getReco rdWriter(DBOutputFormat.java:162)
at org.apache.hadoop.mapred.MapTask$DirectMapOutputCollec tor.(MapTask.java:662)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask. java:352)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:307)
at org.apache.hadoop.mapred.Child.main(Child.java:170)

Any pointer to what could be the problem will be highly appreciated. Also, will be happy to provide more info

Thanks

Ranjan

tomnolan 594 posts Joined 01/08
09 Aug 2011

The most likely problem is that your classpath is not correct -- the Teradata JDBC Driver is not available on your classpath.

The Hadoop code calls Class.forName to load the Teradata JDBC Driver class, and if that throws ClassNotFoundException, then the Hadoop code catches it and throws an IOException instead with the same exception message text. That is what you are seeing.

ranjans 3 posts Joined 08/11
10 Aug 2011

Thanks a lot. I made sure the classpath has the tera driver
/home/surasani/ranjan/tdgssconfig.jar:/home/surasani/ranjan/terajdbc4.jar:/var/opt/hadr/hadr/hadoop-0.20.2/hadoop-0.20.2-core.jar:/hadoop-0.20.2-tools.jar:.

could there be any other reasons?

Also, is there working example of using DBOutputFormat with teradriver somewhere I could check?

Thanks
Ranjan

ranjans 3 posts Joined 08/11
11 Aug 2011

Also, the message
java.io.IOException: com.teradata.jdbc.TeraDriver
seems to mean that the driver class was loaded...as it was where the exception was raised. Just a thought.

You must sign in to leave a comment.