How to write JDBC Sink for Spark Structured Streaming [SparkException: Task not serializable]?

后端 未结 3 2040
再見小時候
再見小時候 2020-12-13 21:27

I need a JDBC sink for my spark structured streaming data frame. At the moment, as far as I know DataFrame’s API lacks writeStream to JDBC implementation (neith

3条回答
  •  忘掉有多难
    2020-12-13 21:53

    Just define JDBCSink in a separated file rather than defining it as an inner class which may capture the outer reference.

提交回复
热议问题