Support Questions

Find answers, ask questions, and share your expertise

Reusing nifi 1.10 nars with 1.22

avatar
Expert Contributor

Hi,

 

I have just started using Apache NiFi, so things are pretty new to me.

 

What I want is to migrate our existing NARs(created for nifi 1.10) to version 1.22.

We actually tried it with 1.15.1 too but we found that there were new processor properties which were required, and so things didnt go well.

 

So I want to know if there is some well documented way of achieving it?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@manishg 
I strongly recommend testing our and updating your templates with the new release rather then adding in nars from older releases to the lib folder of a newer release.  Adding old nars will lose and fixes, improvements or security related changes addressed with those old nars.  Doing this is not really addressing yoru issues with yoru templates, but rather "kicking the can down the road".  You will eventually need to take actions.

Also as a heads up since you mentioned "templates"...  NiFi "templates" have been deprecated in favor of the newer "flow definitions" that can be created/downloaded.  The "templates" functionality is going away completely with the upcoming Apache NiFi 2.0 release.

If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.

Thank you,

Matt

View solution in original post

4 REPLIES 4

avatar
Master Mentor

@manishg 
I am a bit unclear with your query,

Are you saying that you developed custom nars for your NiFi?
Migrating to a different version of NiFi would not introduce new properties into your custom nars.

Or are you saying that you are using standard components (processors, controller services, reporting tasks, etc) included already in your NiFi 1.15 and after upgrade those same standard components have introduced new properties (which is a valid scenario)?

While you take some NiFi nars from an older version and drop them in to a newer NiFi, I strongly recommend against this.  Doing so would introduce duplicates of all the processors that a duplicated nar(s) provide.  Those older version processors would not have the bug fixes, enhancements, and security fixes that the newer versions have.  

It is a better approach, especially when making such a large leap from 1.15 to 1.22, to migrate your flow and update any processors that may have been made invalid after upgrade (typically this happens to very few component classes).

If you choose the unrecommended path, you can follow this procedure for adding additional nars to and existing NiFi:
https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#installing-custom-processors

If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.

Thank you,

Matt

avatar
Expert Contributor

Sorry for this late response.

So I have flow templates made for NiFi 1.10. Hence they have their properties and other needed stuff set accordingly.

Now, I have created a new docker image from dockerfile(which is mostly just like official nifi 1.22.0 docker file with some basic customization), and in our maven build process I copy our custom NARs to /libs folder. All works fine.

I test our existing templates with this new image and I see that some processors are invalid(like CSVRecrodLookUpService no longer supports 'csv-format' property OR if FetchXMLFile's Scheduling's Execution is 'Primary' then it makes processor invalid).
So I wanted to know do we rectify such invalid processors manually or we have a documented way for it? 
Issue is that we have large number of templates and if all of them have such invalid processors due to migration to 1.22.0 then many of our templates would stop working out of the box, and hence need quite an effort.

avatar
Expert Contributor

Also, I was wondering if it is feasible to keep multiple versions of NARs in lib folder. This way existing templates may continue working without any issue.

@MattWho 

avatar
Master Mentor

@manishg 
I strongly recommend testing our and updating your templates with the new release rather then adding in nars from older releases to the lib folder of a newer release.  Adding old nars will lose and fixes, improvements or security related changes addressed with those old nars.  Doing this is not really addressing yoru issues with yoru templates, but rather "kicking the can down the road".  You will eventually need to take actions.

Also as a heads up since you mentioned "templates"...  NiFi "templates" have been deprecated in favor of the newer "flow definitions" that can be created/downloaded.  The "templates" functionality is going away completely with the upcoming Apache NiFi 2.0 release.

If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.

Thank you,

Matt