Skip to main content
jg6
Silver ⭐️⭐️
Jul 19, 2021 11:54 AM UTC
Solved

NiFi templates don't include all controller services

Hi all,

 

I have a NiFi flow using DistributedMapCacheServer 1.11.3. I've noticed that this controller service is actually excluded when I create a template from the process group. I see other controller services that are being referenced from the flow in the template, but not this one, presumably because it isn't referenced.

 

How exactly do I get this exported to a template? Any ideas?

 

Regards

DennisJaheruddi
Platinum ⭐️
Jul 22, 2021 3:01 PM UTC

I just did a small test and it indeed seems that only referenced controller services are copied when you copy a process group.

 

I have not found any discussion on the topic, but as it seems to happen for all (just tried csvrecordreader) I suspect it is a feature. I hope this does not seem too unreasonable.

- Dennis Jaheruddin If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.

5 replies

adhishankarit
Gold ⭐️
Jul 19, 2021 2:59 PM UTC

Hi ,

 

If Controller Services created at base processor group level , then you will not get controller services when you create a template only for the subprocessor group . You will have to create a template for base processor group of immediate child processor group or define the distributed mapcache controller service in the processor group which you would want to create a template.

 

scopeofcontroller service.png

For example 'Stream Ingestion' is immediate super processorgroup of 'TestSample' processorgorup . If i create a template for 'TestSample' processor group then in the template i can not see the DistributedMapCacheServer controller service because the specific controller service scope is in Streaming Ingestion processgroup as a template.

 

Controller Services created within a Process Group will be available/referenced to all descendant components.

 

Thanks

Translate
jg6
jg6Author
Silver ⭐️⭐️
Jul 19, 2021 3:30 PM UTC

Hi, thanks for the response!

 

What I have is a process group called "test", and inside is the controller service "DistributedMapCacheServer" + some other processors.

 

When I create the template of "test", I get the processors and controller services in the template, except for DistributedMapCacheServer. I have a feeling it's because DistributedMapCacheServer is not using a SSL context service and it has no connections to any processors/controller services, so it's being excluded. Does that make sense?

 

controller-services.png

The cache client is include (it's referenced by a processor so it shows up under relationships) but the cache server is still not included.

Translate
DennisJaheruddi
Platinum ⭐️
Platinum ⭐️
Jul 22, 2021 3:01 PM UTC

I just did a small test and it indeed seems that only referenced controller services are copied when you copy a process group.

 

I have not found any discussion on the topic, but as it seems to happen for all (just tried csvrecordreader) I suspect it is a feature. I hope this does not seem too unreasonable.

Translate
- Dennis Jaheruddin If this answer helped, please mark it as 'solved' and/or if it is valuable for future readers please apply 'kudos'.