GitHub user mcfongtw opened a pull request:
https://github.com/apache/flink/pull/4605
[FLINK-4500] [C* Connector] CassandraSinkBase implements
CheckpointedFunction
## What is the purpose of the change
Have CassandraSinkBase to implement CheckpointedFunction so that all
in-flight mutation message could be sent to C* sink before a checkpoint
performs. As a result, the checkpoint would be complete.
## Brief change log
* Implement CheckpointedFunction to (optionally) wait on all pending
records being flushed to the C* sink before checkpoint performs (or closing
connection).
* Add debugging message in CassandraSinkBase.
* Add unit tests for simple / multi-threaded message dispatching for
successful / failed scenarios
* Add unit tests for failure handling logics on errors thrown at different
stages.
* Add unit tests for flushing pending records when checkpoint performs.
* Provide a Immediate / Delayed type of ResultSetFuture for testing
purposes.
* Add CassandraBaseTest in suppression list to use guava imports
* In log4j-test settings, change root log level to INFO and enable ALL
level against some test classes.
## Verifying this change
This change is already covered by existing tests, such as
*CassandraBaseTest*.
This change added tests and can be verified as follows:
* Add unit tests for simple / multi-threaded message dispatching for
successful / failed scenarios
* Add unit tests for failure handling logics on errors thrown at different
stages.
* Add unit tests for flushing pending records when checkpoint performs.
* Provide a Immediate / Delayed type of ResultSetFuture for testing
purposes.
* Add CassandraBaseTest in suppression list to use guava imports
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (yes / **no**)
- The public API, i.e., is any changed class annotated with
`@Public(Evolving)`: (yes / **no**)
- The serializers: (yes / **no** / don't know)
- The runtime per-record code paths (performance sensitive): (yes /
**no** / don't know)
- Anything that affects deployment or recovery: JobManager (and its
components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
## Documentation
- Does this pull request introduce a new feature? (yes / **no** (maybe) )
- If yes, how is the feature documented? (not applicable / docs /
JavaDocs / not documented)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mcfongtw/flink FLINK-4500
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/4605.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #4605
----
commit caefe390bf2aaa22d996cc24a31a3ba76241fb23
Author: Michael Fong <[email protected]>
Date: 2017-08-14T12:57:06Z
[FLINK-4500] CassandraSinkBase implements CheckpointedFunction
* Implement CheckpointedFunction to (optionally) wait on all pending
records being flushed to the C* sink before taking a snapshot (or closing
connection).
* Add debugging message in CassandraSinkBase.
* Add unit tests for simple / multi-threaded message dispatching for
successful / failed scenarios
* Add unit tests for failure handling logics on errors thrown at different
stages.
* Add unit tests for flushing pending records when checkpoint performs.
* Provide a Immediate / Delayed type of ResultSetFuture for testing
purposes.
* Add CassandraBaseTest in suppression list to use guava imports
* In log4j-test settings, change root log level to INFO and enable ALL
level against some test classes.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---