Sqoop从Presto数据库,[Teradata的] [JDBC](11975)不支持的事务隔离等级:2
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Sqoop从Presto数据库,[Teradata的] [JDBC](11975)不支持的事务隔离等级:2相关的知识,希望对你有一定的参考价值。
我能够连接并使用CLI查询普雷斯托数据库,星火等
但是,当我尝试从PrestoDB实例为S3 Sqoop进口,我得到这个事务隔离错误:
8/02/26 03:03:46 DEBUG sqoop.ConnFactory: Loaded manager factory: org.apache.sqoop.manager.oracle.OraOopManagerFactory
18/02/26 03:03:46 DEBUG sqoop.ConnFactory: Loaded manager factory: com.cloudera.sqoop.manager.DefaultManagerFactory
18/02/26 03:03:46 WARN sqoop.ConnFactory: Parameter --driver is set to an explicit driver however appropriate connection manager is not being set (via --connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify explicitly which connection manager should be used next time.
18/02/26 03:03:46 INFO manager.SqlManager: Using default fetchSize of 1000
18/02/26 03:03:46 INFO tool.CodeGenTool: Beginning code generation
18/02/26 03:03:46 DEBUG manager.SqlManager: Execute getColumnInfoRawQuery : SELECT t.* FROM alarm_types AS t WHERE 1=0
18/02/26 03:03:46 DEBUG manager.SqlManager: No connection paramenters specified. Using regular API for making connection.
18/02/26 03:05:56 ERROR manager.SqlManager: Error executing statement: java.sql.SQLException: [Teradata][JDBC](11975) Unsupported transaction isolation level: 2.
java.sql.SQLException: [Teradata][JDBC](11975) Unsupported transaction isolation level: 2.
at com.teradata.exceptions.ExceptionConverter.toSQLException(Unknown Source)
at com.teradata.jdbc.common.SConnection.setTransactionIsolation(Unknown Source)
at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:891)
at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:744)
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:767)
at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:270)
at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:241)
at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:227)
at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:295)
at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1833)
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1645)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
18/02/26 03:05:56 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriter
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1651)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
我试着用标准的Facebook司机罐子,还与Teradata的普雷斯托JDBC JAR,得到同样的错误与这两个驱动程序。
异常时使用Facebook的驱动程序:
18/02/26 19:22:20 ERROR manager.SqlManager: Error executing statement: java.sql.SQLFeatureNotSupportedException: Transactions are not yet supported
java.sql.SQLFeatureNotSupportedException: Transactions are not yet supported
at com.facebook.presto.jdbc.PrestoConnection.setTransactionIsolation(PrestoConnection.java:220)
at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:891)
at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:744)
at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:767)
at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:270)
at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:241)
at org.apache.sqoop.manager.SqlManager.getColumnTypes(SqlManager.java:227)
at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:295)
at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1833)
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1645)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
18/02/26 19:22:20 ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: No columns to generate for ClassWriter
at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1651)
at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:107)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:478)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
这里是我的Sqoop命令:
sqoop import \
-libjars $teradata_jar_path --driver $teradata_driver \
--verbose \
--connect jdbc:presto://xxx/<db> \
--table <tablename> --target-dir s3://<s3-path> \
--relaxed-isolation
请注意,我试图与“--relaxed隔离”的井,但得到同样的错误。任何帮助将不胜感激。
谢谢
答案
请升级您的Presto安装。我建议你使用最新的一个。
请注意使用SQL语句或JDBC标准机制0.189加入交易的支持:https://prestosql.io/docs/current/release/release-0.189.html
以上是关于Sqoop从Presto数据库,[Teradata的] [JDBC](11975)不支持的事务隔离等级:2的主要内容,如果未能解决你的问题,请参考以下文章