Hi,

Apache NiFi 2.0 offers a new facility to automatically migrate properties
from components that are backward incompatible. So that we can rename them
or change their types more freely.

I'm originally working on NIFI-13311, where I'm introducing Database
(Dialect) Adapter controller services, instead of having an inextensible,
fixed set of dialects, as we have in the standard NiFi components.

This project involves replacing the old 'db-type' properties, with ones
that now refer to respective controller services. Migration from older
versions of NiFi would need:

   1. Creating a Database Adapter controller service, based on the value of
   the old 'db-type' property.
   2. Referring to that controller service from the component.
   3. Removing the 'db-type' (Database Type) property.

The migration facility of NiFi is pretty simple to use, I just had to
implement the new 'migrateProperties()' method that comes with Processors'
standard interface.

However, the Parameter Providers do not have this method, therefore I
couldn't add automatic migration to the DatabaseParameterProvider standard
component.

I have then put some effort into *NIFI-13327* to resolve this, but this is
how far I got:

   - I have extended the ParameterProvider interface.
   - I have added an implementation for migrateConfiguration in
   StandardParameterProviderNode, based on the StandardProcessorNode.
   - I have added a respective branch to
   StandardVersionedComponentSynchronizer.
   - Implemented the migrateProperties() in DatabaseParameterProvider.
   - Gave it a try by copying the flow.json.gz from a previous version of
   NiFi. But no luck. The Parameter Provider has been successfully created,
   but the migrateProperties did not get called.

I assume there is something special about Parameter Providers. As far as I
understand, these are Controller Level components, and the migration
currently only works with Process Groups.

Here is my draft PR: https://github.com/apache/nifi/pull/9080/files

*Could someone have a look, and give me some hints, advices how to
continue?*

Thanks,
Rajmund

Reply via email to