我正在尝试使用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
1条答案
按热度按时间6qfn3psc1#
配置单元连接器仅支持read\u uncommitted,而sqoop似乎正在请求read\u committed,这是不受支持的。如果可以将sqoop改为uncommitted,那么它应该可以工作。