deadwind4 opened a new pull request #18469:
URL: https://github.com/apache/flink/pull/18469
## What is the purpose of the change
When we directly use buffer-flush options of the mysql sink
(sink.buffer-flush.max-rows and sink.buffer-flush.interval) can not increase
throughput.
We must set 'rewriteBatchedStatements=true' into mysql jdbc url, for
'sink.buffer-flush' to take effect.
Such as: 'jdbc:mysql://ip:3306/dbname?rewriteBatchedStatements=true'
## Brief change log
- *Added a method appendUrlSuffix in MySQLDialect to append
'rewriteBatchedStatements=true'.*
- *Added appendUrlSuffix default method in JdbcDialect interface to do
nothing.*
- *use appendUrlSuffix in JdbcConnectionOptions#Builder#build() method*
## Verifying this change
*(example:)*
- *Added a test case in MySqlDialect to test appendUrlSuffix*
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: (yes)
- The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
- The S3 file system connector: (no)
## Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not documented)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]