Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

NiFi Custom Controller Service Implementation Setup


NiFi Custom Controller Service Implementation Setup

New Contributor

I am trying to write an alternate implementation of the AtomicDistributedMapCacheClient<R> service. Specifically this is so that the "DistributedMapCacheLookupService" can use my implementation.

So far I have the class implementing the interface like so:

public class CustomDistributedMapCacheClientService extends AbstractControllerService implements AtomicDistributedMapCacheClient<Long> {

And I have a pom that generates the service-nar that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""


	<!-- My Custom Java Code -->
	<!-- Add dependency to service api nar to make my implementation available on the classloaders. -->



I set nifi-standard-services-api-nar as a dependency so that the classloaders will be configured properly. This lets me select my custom service in the DistributedMapCacheLookupService. However, it is showing this error in the UI:

... nifi.service.custom.nar is not compatible with DistributedMapCacheClient ...

I traced this message to this function: which returns false. Probably due to the classloading not being setup due to a problem with my pom.xml dependencies. Or I'm implementing the wrong class.

Is it possible to generate a custom service nar that adds an alternative implementation of the DistributedMapCacheClient service to be used by the DistributedMapCacheLookupService? Is there a template project I can refer to in order to set this up properly?

I have read through the Developer Guide on this a couple times: but unfortunately am still confused as to how this works (an example project would help me a lot).




Re: NiFi Custom Controller Service Implementation Setup

New Contributor

Did you ever find a solution to this? I have the exact same problem.

Re: NiFi Custom Controller Service Implementation Setup

Community Manager

@chubbs As this thread is older, you would likely be better served by creating a new thread. This would also provide an opportunity to provide further details on your situation, steps taken so far and any errors encountered. 

Cy Jervis, Community Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:
Community Guidelines
How to use the forum
Don't have an account?
Coming from Hortonworks? Activate your account here