Spark *Structured* Streaming 中的 RecordTooLargeException
RecordTooLargeException in Spark *Structured* Streaming
我不断收到此错误消息:
The message is 1169350 bytes when serialized which is larger than the maximum request size you have configured with the max.request.size configuration.
如其他 Whosebug 帖子所述,我正在尝试在 Producer 中设置“max.request.size”配置,如下所示:
.writeStream
.format("kafka")
.option(
"kafka.bootstrap.servers",
conig.outputBootstrapServer
)
.option(ProducerConfig.MAX_REQUEST_SIZE_CONFIG, "10000000")
但这不起作用。我设置正确吗?在 Spark Structured Streaming 下是否有不同的方法来设置此 属性?
如果我没记错的话,你必须在所有 kafka 属性前加上 "kafka." 前缀。你能试试这个吗?
.option(s"kafka.${ProducerConfig.MAX_REQUEST_SIZE_CONFIG}", "10000000")
我不断收到此错误消息:
The message is 1169350 bytes when serialized which is larger than the maximum request size you have configured with the max.request.size configuration.
如其他 Whosebug 帖子所述,我正在尝试在 Producer 中设置“max.request.size”配置,如下所示:
.writeStream
.format("kafka")
.option(
"kafka.bootstrap.servers",
conig.outputBootstrapServer
)
.option(ProducerConfig.MAX_REQUEST_SIZE_CONFIG, "10000000")
但这不起作用。我设置正确吗?在 Spark Structured Streaming 下是否有不同的方法来设置此 属性?
如果我没记错的话,你必须在所有 kafka 属性前加上 "kafka." 前缀。你能试试这个吗?
.option(s"kafka.${ProducerConfig.MAX_REQUEST_SIZE_CONFIG}", "10000000")