Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Facing issues with tdch while import the data from teradata to Hive.

Highlighted

Facing issues with tdch while import the data from teradata to Hive.

Contributor

I am trying to import data to hive (HDP 2.4) from teradata 14.10 using TDCH.

TDCH ver is 1.3.4 as for 1.4.1 the hadoop jar .... command gives invalid jar file error. here is command i am using.

export HADOOP_HOME=/usr/hdp/current/hadoop-client/ export HIVE_HOME=/usr/hdp/current/hive-client/ export HCAT_HOME=/usr/hdp/current/hive-webhcat/

export LIB_JARS=/usr/hdp/current/hive-client/lib/avro-1.7.5.jar,/usr/hdp/current/hive-client/conf,/usr/hdp/current/hive-client/lib/antlr-runtime-3.4.jar,/usr/hdp/current/hive-client/lib/commons-dbcp-1.4.jar,/usr/hdp/current/hive-client/lib/commons-pool-1.5.4.jar,/usr/hdp/current/hive-client/lib/datanucleus-api-jdo-4.2.1.jar,/usr/hdp/current/hive-client/lib/datanucleus-core-4.1.6.jar,/usr/hdp/current/hive-client/lib/datanucleus-rdbms-4.1.7.jar,/usr/hdp/current/hive-client/lib/hive-cli-1.2.1000.2.5.3.0-37.jar,/usr/hdp/current/hive-client/lib/jdo-api-3.0.1.jar,/usr/hdp/current/hive-client/lib/hive-exec-1.2.1000.2.5.3.0-37.jar,/usr/hdp/current/hive-client/lib/hive-jdbc-1.2.1000.2.5.3.0-37.jar,/usr/hdp/current/hive-client/lib/hive-metastore-1.2.1000.2.5.3.0-37.jar,/usr/hdp/current/hive-client/lib/hive-metastore.jar,/usr/hdp/current/hive-client/lib/libfb303-0.9.3.jar,/usr/hdp/current/hive-client/lib/libthrift-0.9.3.jar,/usr/hdp/current/hive-server2-hive2/lib/hive-hcatalog-core-2.1.0.2.5.3.0-37.jar

export HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:/usr/hdp/current/hive-client/lib/avro-1.7.5.jar,/usr/hdp/current/hive-client/conf,/usr/hdp/current/hive-client/lib/antlr-runtime-3.4.jar,/usr/hdp/current/hive-client/lib/commons-dbcp-1.4.jar,/usr/hdp/current/hive-client/lib/commons-pool-1.5.4.jar,/usr/hdp/current/hive-client/lib/datanucleus-api-jdo-4.2.1.jar,/usr/hdp/current/hive-client/lib/datanucleus-core-4.1.6.jar,/usr/hdp/current/hive-client/lib/datanucleus-rdbms-4.1.7.jar,/usr/hdp/current/hive-client/lib/hive-cli-1.2.1000.2.5.3.0-37.jar,/usr/hdp/current/hive-client/lib/jdo-api-3.0.1.jar,/usr/hdp/current/hive-client/lib/hive-exec-1.2.1000.2.5.3.0-37.jar,/usr/hdp/current/hive-client/lib/hive-jdbc-1.2.1000.2.5.3.0-37.jar,/usr/hdp/current/hive-client/lib/hive-metastore-1.2.1000.2.5.3.0-37.jar,/usr/hdp/current/hive-client/lib/hive-metastore.jar,/usr/hdp/current/hive-client/lib/libfb303-0.9.3.jar,/usr/hdp/current/hive-client/lib/libthrift-0.9.3.jar,/usr/hdp/current/hive-server2-hive2/lib/hive-hcatalog-core-2.1.0.2.5.3.0-37.jar:/usr/hdp/current/hive-client/lib/:/usr/hdp/current/hadoop-client/lib/

hadoop jar /usr/lib/tdch/1.5/lib/teradata-connector-1.5.0.jar com.teradata.connector.common.tool.ConnectorImportTool -libjars $LIB_JARS -url jdbc:teradata://tera.db1 -username *** -password ** -jobtype hive -sourcetable SWIAA03 -nummappers 14 -targettable tdch.SWIAA03

when i run above command. following error is returned
java.io.FileNotFoundException: ./hadoop-mapreduce.jobsummary.log (Permission denied) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(FileOutputStream.java:270) at java.io.FileOutputStream.<init>(FileOutputStream.java:213) at java.io.FileOutputStream.<init>(FileOutputStream.java:133) at org.apache.log4j.FileAppender.setFile(FileAppender.java:294) at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207) at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165) at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172) at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104) at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842) at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768) at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:672) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:516) at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580) at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526) at org.apache.log4j.LogManager.<clinit>(LogManager.java:127) at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:64) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:285) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:305) at org.apache.hadoop.util.RunJar.<clinit>(RunJar.java:54) 17/01/20 08:46:29 INFO tool.ConnectorImportTool: ConnectorImportTool starts at 1484919989308 17/01/20 08:46:29 INFO common.ConnectorPlugin: load plugins in file:/tmp/hadoop-unjar8991125251245146471/teradata.connector.plugins.xml 17/01/20 08:46:29 INFO tool.ConnectorImportTool: java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/api/NoSuchObjectException at com.teradata.connector.common.tool.ConnectorImportTool.processArgs(ConnectorImportTool.java:683) at com.teradata.connector.common.tool.ConnectorImportTool.run(ConnectorImportTool.java:65) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90) at com.teradata.connector.common.tool.ConnectorImportTool.main(ConnectorImportTool.java:813) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.hadoop.util.RunJar.run(RunJar.java:233) at org.apache.hadoop.util.RunJar.main(RunJar.java:148) Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.metastore.api.NoSuchObjectException at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 11 more

am i missing something in commadn line or do i need to install any pluging explicity?

Thanks

Don't have an account?
Coming from Hortonworks? Activate your account here