简体   繁体   English

云数据流云 sql 数据流运行器给出空指针异常

[英]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 finishBundleNUllPointerException是在另一个原因finishBundle

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 组成的任务运行器在Spring Cloud Dataflow Kubernetes服务器中失败 - Composed task runner failing in spring cloud dataflow kubernetes server 无法从云数据流转换连接到云sql - Cannot connect to cloud sql from cloud dataflow transform Tracer 在 Spring 云合约测试中给出 Null 指针异常 - Tracer Giving Null Pointer Exception in Spring Cloud Contract Test 使用Google Cloud Dataflow的数据存储区Java API将属性设置为null吗? - Set a property to null with Google Cloud Dataflow's Java API for Datastore? Spring Cloud DataFlow自动运行 - Spring Cloud DataFlow automated run 如何修复Google DataFlow管道(args)空指针异常? - How to fix Google DataFlow Pipeline (args) null pointer exception? Null 在 Apache Beam [DataFlow] 中读取 JdbcIO 的指针异常 - Null Pointer Exception with JdbcIO read in Apache Beam [DataFlow] 云数据流,PubSub和Bigquery问题 - Cloud Dataflow, PubSub & Bigquery Issues 使用Cloud Dataflow运行外部库 - Running external library with Cloud Dataflow 支持Cloud Bigtable作为Cloud Dataflow中的接收器 - Support for Cloud Bigtable as Sink in Cloud Dataflow
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM