Sqoop Presto使用Teadata Presto驱动程序-ParseError



我正试图使用Hadoop Sqoop从Presto数据库中获取数据,这在Presto:中引发了此错误

18/07/12 10:34:05 DEBUG manager.SqlManager: No connection paramenters specified. Using regular API for making connection.
18/07/12 10:34:06 ERROR manager.SqlManager: Error executing statement: java.sql.SQLException: [Teradata][Presto](100050) Query failed: Current transaction is aborted, commands ignored until end of transaction block.
java.sql.SQLException: [Teradata][Presto](100050) Query failed: Current transaction is aborted, commands ignored until end of transaction block.
at com.teradata.presto.presto.PRUtils.parseError(Unknown Source)
at com.teradata.presto.presto.dataengine.PRResultSet.parseDataString(Unknown Source)
at com.teradata.presto.presto.dataengine.PRResultSet.execute(Unknown Source)
at com.teradata.presto.presto.dataengine.PRResultSet.<init>(Unknown Source)
at com.teradata.presto.presto.dataengine.PRQueryExecutor.<init>(Unknown Source)
at com.teradata.presto.presto.dataengine.PRDataEngine.prepare(Unknown Source)
at com.teradata.presto.jdbc.common.SPreparedStatement.<init>(Unknown Source)
at com.teradata.presto.jdbc.jdbc41.S41PreparedStatement.<init>(Unknown Source)
at com.teradata.presto.jdbc.jdbc42.S42PreparedStatement.<init>(Unknown Source)
at com.teradata.presto.jdbc.jdbc42.JDBC42ObjectFactory.createPreparedStatement(Unknown Source)
at com.teradata.presto.presto.jdbc42.PRJDBC42ObjectFactory.createPreparedStatement(Unknown Source)
at com.teradata.presto.jdbc.common.SConnection.prepareStatement(Unknown Source)
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)

因为在Presto DB方面没有错误。Sqoop命令:

sqoop-import 
--verbose 
--driver com.teradata.presto.jdbc42.Driver
--connect 'jdbc:presto://bla:8443/hive?SSL=true&SSLTrustStorePath=bla&SSLTrustStorePassword=bla' 
--username bla -P 
--table hive.bla.blah 
--m 2

Teradata Presto驱动程序版本:PrestoJDBC42-1.0.21.1031.jar

Hive连接器仅支持READ_UNCOMITTED,而sqoop似乎正在请求READ_COMMITTED,这是不受支持的。如果可以将sqoop更改为READ_UNCOMMITED,那么它应该可以工作。

相关内容

  • 没有找到相关文章

最新更新