Hi
I have been trying to write a simple Cache Controller Service that uses a Map 
to hold <String, String> key/value pairs. I am using nifi-0.1.0-incubating. I 
have created an Interface called CacheService which extends 
ControllerService.public interface CacheService extends ControllerService {

I have created an implementation called StandardCacheService which is as 
follows:
public class StandardCacheService extends AbstractControllerService implements 
CacheService {
I have compiled the StandardCacheService and created a nar which I have then 
put into my NiFi lib directory, my StandardCacheService Controller Service 
appears in the Controller services tab of the NiFi Flow Settings panel, I can 
edit it and enable it. Also there are no abnormal log messages.
However, when I try to configure the CacheService in my test Processor, again I 
get no errors but when I cannot see my StandardCacheService.  My processor has 
the following snippets to implement the Cache Service/Controller:
 public static final PropertyDescriptor CACHE_SERVICE = new 
PropertyDescriptor.Builder()
     .name("Cache Service")
     .description("The Controller Service to use in order to obtain a Cache 
Service")
     .required(false)
     .identifiesControllerService(CacheService.class)
     .build();

        final CacheService cache = 
context.getProperty(CACHE_SERVICE).asControllerService(CacheService.class);
         



When configuring the processor, the 'Cache Service' drop down doesn't show a 
populated list showing my StandardCacheService, but it does allow me to create 
a new service, the resulting panel allows me to then select 
StandardCacheService.     When I select 'create' I get a UUID value in the 
Value property of the Configure Processor panel.   When I then apply this the 
processor shows a yellow triangle, when I hover over it I get the following 
message:
'Cache Service validated against <UUID> is invalid because Invalid Controller 
service <UUID> is not a valid Controller service Identifier or does not 
reference the correct type of Controller service.'
Can you help please
Many thanksDave

Reply via email to