我正在尝试将数据帧写入OmniSci的数据库,基本上是GPU支持的SQL数据库。尝试这样做时,我收到一个奇怪的错误:
subs_dim.write.format("jdbc").option("url", "jdbc:mapd:EC2ADDRESS.compute-1.amazonaws.com:9091:mapd").option("driver", "com.mapd.jdbc.MapDDriver").option("dbtable", "subs_dim").option("user", "mapd").option("password", "INSTANCEID").save()
并收到此错误:
java.sql.SQLException: Connection failed - org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection timed out (Connection timed out)
Py4JJavaError:调用o309.save时发生错误。 :java.sql.SQLException:连接失败-org.apache.thrift.transport.TTransportException:java.net.ConnectException:连接超时(连接超时) 在com.mapd.jdbc.MapDConnection。(MapDConnection.java:113) 在com.mapd.jdbc.MapDDriver.connect(MapDDriver.java:55) 在org.apache.spark.sql.execution.datasources.jdbc.DriverWrapper.connect(DriverWrapper.scala:45) 在org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils $$ anonfun $ createConnectionFactory $ 1.apply(JdbcUtils.scala:63) 在org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils $$ anonfun $ createConnectionFactory $ 1.apply(JdbcUtils.scala:54) 在org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider.createRelation(JdbcRelationProvider.scala:63)上 在org.apache.spark.sql.execution.datasources.SaveIntoDataSourceCommand.run(SaveIntoDataSourceCommand.scala:45) 在org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult $ lzycompute(commands.scala:72) 在org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:70) 在org.apache.spark.sql.execution.command.ExecutedCommandExec.doExecute(commands.scala:88) 在org.apache.spark.sql.execution.SparkPlan $$ anonfun $ execute $ 1.apply(SparkPlan.scala:150) 在org.apache.spark.sql.execution.SparkPlan $$ anonfun $ execute $ 1.apply(SparkPlan.scala:138) 在org.apache.spark.sql.execution.SparkPlan $$ anonfun $ executeQuery $ 5.apply(SparkPlan.scala:190) 在org.apache.spark.rdd.RDDOperationScope $ .withScope(RDDOperationScope.scala:151) 在org.apache.spark.sql.execution.SparkPlan.executeQuery(SparkPlan.scala:187) 在org.apache.spark.sql.execution.SparkPlan.execute(SparkPlan.scala:138) 在org.apache.spark.sql.execution.QueryExecution.toRdd $ lzycompute(QueryExecution.scala:108) 在org.apache.spark.sql.execution.QueryExecution.toRdd(QueryExecution.scala:108) 在org.apache.spark.sql.DataFrameWriter $$ anonfun $ runCommand $ 1.apply(DataFrameWriter.scala:683) 在org.apache.spark.sql.DataFrameWriter $$ anonfun $ runCommand $ 1.apply(DataFrameWriter.scala:683) 在org.apache.spark.sql.execution.SQLExecution $$ anonfun $ withCustomExecutionEnv $ 1.apply(SQLExecution.scala:89) 在org.apache.spark.sql.execution.SQLExecution $ .withSQLConfPropagated(SQLExecution.scala:175) 在org.apache.spark.sql.execution.SQLExecution $ .withCustomExecutionEnv(SQLExecution.scala:84) 在org.apache.spark.sql.execution.SQLExecution $ .withNewExecutionId(SQLExecution.scala:126) 在org.apache.spark.sql.DataFrameWriter.runCommand(DataFrameWriter.scala:683) 在org.apache.spark.sql.DataFrameWriter.saveToV1Source(DataFrameWriter.scala:287) 在org.apache.spark.sql.DataFrameWriter.save(DataFrameWriter.scala:281) 在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处 在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在java.lang.reflect.Method.invoke(Method.java:498) 在py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244) 在py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:380) 在py4j.Gateway.invoke(Gateway.java:295) 在py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132) 在py4j.commands.CallCommand.execute(CallCommand.java:79) 在py4j.GatewayConnection.run(GatewayConnection.java:251) 在java.lang.Thread.run(Thread.java:748)
有人有想法吗?我已对服务器执行ping操作并确认端口已打开