Skip to main content
Trilok
Bronze ⭐️⭐️⭐️
June 26, 2024
Question

Nifi 2.0-M2 Support with flow xml gz

Hi Team,

I am upgrading my old nifi 1.14 to 2.0 M2 version. But i want to support of both flow xml and flow json. for this reason what should my approach to migrate it as soon as possible.. So my nifi can work either with xml or with json as per my requirement.

Thank you for your time. 

7 replies

DianaTorres
Community Manager
Community Manager
June 26, 2024

@Trilok Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our NiFi experts @MattWho @joseomjr  who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.

Translate
Regards, Diana Torres, Senior Community Moderator
MattWho
Titanium ⭐️⭐️⭐️
Titanium ⭐️⭐️⭐️
July 1, 2024

@Trilok 

The older flow.xml.gz format was deprecated as of Apache NiFi 1.16 in favor of the newer flow.json.gz format.   NiFi 1.16+ will only load the flow.xml.gz if the flow.json.gz does not already exist during startup.  Upon successful startup, NiFi will generate the flow.json.gz.  The NiFi 1.16+ version will still generate both the flow.xml.gz and flow.json.gz formats with every change made on the UI. 

With the major release of Apache NiFi 2.x, the deprecated flow.xml.gz format was removed.
There is no option in NiFi 2.0 to support the older flow.xml.gz format.

Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

Translate
Shampy
Silver ⭐️⭐️
January 28, 2025

Thanks @MattWho for the suggestion, i am trying to upgrade from 1.27.0 to 2.0.0M3, and as you suggetsed for deprecation of flow xml file, i updated my nifi.properties accordingly and make it from 

nifi.flow.configuration.file=./conf/flow/flow.xml.gz to 
nifi.flow.configuration.file=./conf/flow/flow.json.gz

Is my understanding correct?
I am still getting nifi pod not coming back and aplication server getting shutdown in few minutes.
 
Your suggestion would really be appreciated
Translate
MattWho
Titanium ⭐️⭐️⭐️
Titanium ⭐️⭐️⭐️
January 28, 2025

@Shampy 

Apache NiFi does NOT support the older flow.xml.gz format. It can only load the newer flow.json.gz format.  Your Apache NiFi 1.27 should be producing both the flow.xml.gz and flow.json.gz flow storage formats.  You'll need to use the flow.json.gz format in your NiFi 2.x installation.

Apache NiFi 1.x introduced the newer flow.json.gz flow storage format in Apache NiFi 1.16 and newer.  In those newer versions of Apache NiFi 1.16+ will generate the newer flow.json.gz format and still maintain the older flow.xml.gz format.   This positions you for upgrading to Apache NiFi 2.x.  You'll now have the flow.json.gz needed to load in your 2.x version.

The proper path to Apache NiFi 2.x is to first to upgrade to the latest Apache NiFi 1.x release.  Before upgrading to Apache NiFi 2.x version, you should review the release notes between your current version to the version you plan to upgrade to.  This allow you to see if you are using and components that have been removed or if any breaking changes impact your dataflows:
https://cwiki.apache.org/confluence/display/NIFI/Release+Notes/#ReleaseNotes-Version2.1.0

 

NOTE: 
In Apache NiFi 1.x versions that support both the flow.xml.gz and the newer flow.json.gz format, the flow.xml.gz format file will be ignored on startup if a flow.json.gz exists.

 

 

Please help our community thrive. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.

Thank you,
Matt

Translate
DianaTorres
Community Manager
Community Manager
July 5, 2024

@Trilok Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks.

Translate
Regards, Diana Torres, Senior Community Moderator