When preparing to migrate from Cloudera Flow Management 2.1.7 (NiFi
1–based) to Cloudera Flow Management 4.x (NiFi 2–based), you can run the
migration precheck manually from the command line on your NiFi nodes, even if NiFi is
managed by Cloudera Manager. The precheck helps identify potential issues
before the transition to NiFi 2 by highlighting the required preparation steps and flagging
breaking changes that cannot be automatically handled by the Cloudera Flow Management Migration Tool. The manual precheck provides greater
administrative control and is useful in scenarios where a command-line–based process is
required or preferred. Follow the below steps to perform a precheck directly from the
command line.
This task must be performed in Cloudera Flow Management 2.1.7.
-
Switch the user to NiFi using
su nifi.
-
Find the location of these files.
- pre_upgrade_check.py
- CFM4-Deprecated-components.csv
- NiFi-1.x-components-with-legacy-Kerberos-properties.csv
-
Identify the
${NIFI_WORKING_DIRECTORY} environment variable,
which can be found in stdout.log during NiFi startup.
-
Use Python3 to run the script with the following command, replacing the
placeholders with the actual paths.
python3 [***/path/to***]/pre_upgrade_check.py \
"${NIFI_WORKING_DIRECTORY}/flow.json.gz" \
"[***/path/to***]/CFM4-Deprecated-components.csv" \
"[***/path/to***]/NiFi-1.x-components-with-legacy-Kerberos-properties.csv" \
"[***NIFI_WORKING_DIRECTORY***]/config_backup/bootstrap.conf" \
"${CUSTOM_JAVA_HOME}"
-
If necessary, specify the
${CUSTOM_JAVA_HOME} argument.
This should be set if the JAVA_HOME environment variable for
the "nifi" user is different from the JAVA_HOME you are using
to run the NiFi service.
-
Once all file paths are updated in the command, run it to start the migration
precheck.