Matt Burgess created NIFI-11380:
-----------------------------------
Summary: Refactor CaptureChangeMySQL with improvements
Key: NIFI-11380
URL: https://issues.apache.org/jira/browse/NIFI-11380
Project: Apache NiFi
Issue Type: Improvement
Reporter: Matt Burgess
The CaptureChangeMySQL processor can be improved in many ways:
- Eliminate use of DistributedCacheClient
- MySQLCDCUtils - delete this class. It’s unnecessary. Just put the single
method that exists in the parent class of the writers
- Eliminate mutable member variables. Gather all state together into an object
and store that as a single volatile member variable.
- The outputEvents method is a huge block of switch/case and if/then/else
blocks. Kill all of this. Create an interface that’s capable of handling a
given event type and have multiple implementations. Determine appropriate impl
and call the method.
- Do not keep a bunch of member variables to “rollback local state”. Keep this
in variables. If we fail, no harm, no foul. If we succeed, then update member
variable.
- Remove onStopped method, just annotate stop() method with @OnStopped. No need
for @OnShutdown
- Change name of “hostname” property to "node", and don’t require the port!
Default to 3306.
- Remove unused hasRun member variable
--
This message was sent by Atlassian Jira
(v8.20.10#820010)