Estou tentando me conectar ao Teradat usando o Sqoop
com o seguinte comando:
sqoop import -libjars /usr/lib/sqoop/lib/tdgssconfig.jar,/usr/lib/sqoop/lib/terajdbc4.jar -driver com.teradata.jdbc.TeraDriver --connec
t "jdbc:teradata://<IP>;databaseName=<DB name>;user=<user>;password=<password>" --^Cble FACT -m 1 --target-dir /user/hduser/sqoop_trials/mangesh_test
estou recebendo o seguinte erro
2014-09-15.15:38:48.636 TERAJDBC4 ERROR [main] com.teradata.jdbc.jdbc_4.TDSession@1b3f1bfb Connection to <IP addr>;databaseName=<Database_name>;user=<user_name>;password=<password>Mon Sep 15 15:38:48 IST 2014 socket orig=<IP addr>;databaseName=<Database_name>;user=<user_name>;password=<password>cid=391cde0 sess=0 java.net.UnknownHostException: <IP addr>;databaseName=<Database_name>;user=<user_name>;password=<password> at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293) at java.net.InetAddress.getAllByName0(InetAddress.java:1246) at java.net.InetAddress.getAllByName(InetAddress.java:1162) at java.net.InetAddress.getAllByName(InetAddress.java:1098) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.<init>(TDNetworkIOIF.java:174) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.connectToHost(TDNetworkIOIF.java:273) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.<init>(TDNetworkIOIF.java:108) at com.teradata.jdbc.jdbc_4.TDSession.getIO(TDSession.java:582) at com.teradata.jdbc.jdbc.GenericStateController.<init>(GenericStateController.java:41) at com.teradata.jdbc.jdbc.GenericLogonController.<init>(GenericLogonController.java:40) at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:200) at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalConnection.<init>(TeraLocalConnection.java:99) at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:58) at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:218) at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:151) at java.sql.DriverManager.getConnection(DriverManager.java:571) at java.sql.DriverManager.getConnection(DriverManager.java:233) at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:824) at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52) at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:685) at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:708) at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:243) at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:226) at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:347) at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1298) at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1110) at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96) at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:396) at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:506) at org.apache.sqoop.Sqoop.run(Sqoop.java:147) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:222) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231) at org.apache.sqoop.Sqoop.main(Sqoop.java:240)
14/09/15 15:38:48 ERROR manager.SqlManager: Error executing statement: com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata JDBC Driver] [TeraJDBC 13.00.00.33] [Error 1000] [SQLState 08S01] Login failure for Connection to <IP addr>;databaseName=<Database_name>;user=<user_name>;password=<password>Mon Sep 15 15:38:48 IST 2014 socket orig=<IP addr>;databaseName=<Database_name>;user=<user_name>;password=<password>cid=391cde0 sess=0 java.net.UnknownHostException: <IP addr>;databaseName=<Database_name>;user=<user_name>;password=<password> at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293) at java.net.InetAddress.getAllByName0(InetAddress.java:1246) at java.net.InetAddress.getAllByName(InetAddress.java:1162) at java.net.InetAddress.getAllByName(InetAddress.java:1098) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.<init>(TDNetworkIOIF.java:174) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.connectToHost(TDNetworkIOIF.java:273) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.<init>(TDNetworkIOIF.java:108) at com.teradata.jdbc.jdbc_4.TDSession.getIO(TDSession.java:582) at com.teradata.jdbc.jdbc.GenericStateController.<init>(GenericStateController.java:41) at com.teradata.jdbc.jdbc.GenericLogonController.<init>(GenericLogonController.java:40) at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:200) at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalConnection.<init>(TeraLocalConnection.java:99) at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:58) at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:218) at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:151) at java.sql.DriverManager.getConnection(DriverManager.java:571) at java.sql.DriverManager.getConnection(DriverManager.java:233) at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:824) at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52) at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:685) at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:708) at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:243) at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:226) at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:347) at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1298) at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1110) at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96) at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:396) at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:506) at org.apache.sqoop.Sqoop.run(Sqoop.java:147) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:222) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231) at org.apache.sqoop.Sqoop.main(Sqoop.java:240)
com.teradata.jdbc.jdbc_4.util.JDBCException: [Teradata JDBC Driver] [TeraJDBC 13.00.00.33] [Error 1000] [SQLState 08S01] Login failure for Connection to <IP addr>;databaseName=<Database_name>;user=<user_name>;password=<password>Mon Sep 15 15:38:48 IST 2014 socket orig=<IP addr>;databaseName=<Database_name>;user=<user_name>;password=<password>cid=391cde0 sess=0 java.net.UnknownHostException: <IP addr>;databaseName=<Database_name>;user=<user_name>;password=<password> at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293) at java.net.InetAddress.getAllByName0(InetAddress.java:1246) at java.net.InetAddress.getAllByName(InetAddress.java:1162) at java.net.InetAddress.getAllByName(InetAddress.java:1098) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.<init>(TDNetworkIOIF.java:174) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.connectToHost(TDNetworkIOIF.java:273) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.<init>(TDNetworkIOIF.java:108) at com.teradata.jdbc.jdbc_4.TDSession.getIO(TDSession.java:582) at com.teradata.jdbc.jdbc.GenericStateController.<init>(GenericStateController.java:41) at com.teradata.jdbc.jdbc.GenericLogonController.<init>(GenericLogonController.java:40) at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:200) at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalConnection.<init>(TeraLocalConnection.java:99) at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:58) at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:218) at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:151) at java.sql.DriverManager.getConnection(DriverManager.java:571) at java.sql.DriverManager.getConnection(DriverManager.java:233) at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:824) at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52) at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:685) at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:708) at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:243) at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:226) at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:347) at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1298) at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1110) at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:96) at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:396) at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:506) at org.apache.sqoop.Sqoop.run(Sqoop.java:147) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:222) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231) at org.apache.sqoop.Sqoop.main(Sqoop.java:240)
Anteriormente, eu estava usando o seguinte comando para listar tabelas
sqoop list-tables --connect "jdbc:teradata://<IP>;databaseName=<DB name>;user=<user>;password=<password>"
e estava recebendo o erro abaixo:
14/09/15 16:10:27 ERROR tool.BaseSqoopTool: Got error creating database manager: java.io.IOException: No manager for connect string: jdbc:teradata://<IP>;databaseName=<DB name>;user=<user name>;password=<password>
at org.apache.sqoop.ConnFactory.getManager(ConnFactory.java:185)
at org.apache.sqoop.tool.BaseSqoopTool.init(BaseSqoopTool.java:243)
at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:44)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:222)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231)
at org.apache.sqoop.Sqoop.main(Sqoop.java:240
Alguém poderia sugerir onde estou errando?
Acho que aqui o Sqoop não consegue encontrar o gerenciador de conexões. Se você estiver usando CDH, tente adicionar o seguinte parâmetro em seu comando list-tables.
--connection-manager "com.cloudera.connector.teradata.TeradataManager"