[英]cloud dataflow cloud sql dataflow runner giving null pointer exception
I'm trying to process considerable number of records using cloud dataflow.我正在尝试使用云数据流处理大量记录。 My source is google cloud storage and my sink is cloud SQL(MySQL).
我的来源是谷歌云存储,我的接收器是云 SQL(MySQL)。 I have the following code to write to the sink(Cloud SQL).
我有以下代码要写入接收器(Cloud SQL)。
p.apply()
....
.withDataSourceConfiguration(JdbcIO.DataSourceConfiguration.create(
"com.mysql.cj.jdbc.Driver", "jdbc:mysql://google/<DBNAME>?cloudSqlInstance=<INSTANCE_NAME>&socketFactory=com.google.cloud.sql.mysql.SocketFactory&user=<USERNAME>&password=<PASSWORD>&useSSL=false"
)
)
The above works fine when I run the pipeline using DirectRunner
.当我使用
DirectRunner
运行管道时,上述工作正常。 But it throws a NullPointer Exception
when run on a DataflowRunner
.但是在
DataflowRunner
上运行时会抛出NullPointer Exception
。 The exception is as follows:例外情况如下:
java.lang.NullPointerException
at org.apache.beam.sdk.io.jdbc.JdbcIO$Write$WriteFn.executeBatch(JdbcIO.java:775)
at org.apache.beam.sdk.io.jdbc.JdbcIO$Write$WriteFn.finishBundle(JdbcIO.java:755)
Beam Version = 2.16.0, 2.15.0 - tried both versions but failed. Beam Version = 2.16.0, 2.15.0 - 尝试了两个版本但都失败了。 Any reason why this happens?
发生这种情况的任何原因? What's the solution to make it work with
DataflowRunner
?使它与
DataflowRunner
一起使用的解决方案是什么?
I have resolved this.我已经解决了这个问题。 The
NUllPointerException
is for another reason in the finishBundle
该
NUllPointerException
是在另一个原因finishBundle
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.