Two controller service/lookupservice problems

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Two controller service/lookupservice problems

Mike Thomsen
I found this ticket: https://issues.apache.org/jira/browse/NIFI-4634

Because LookupService uses Map<String, String> for the coordinates
parameter, you can't do something like pass an integer value into the
lookup service. So as the user noted, the MonogDB lookup fails. I think
this is likely to be a problem for all database-driven LookupService
implementations. I was thinking about doing an ElasticSearch-driven one and
I saw another for a Solr-based one. Both would face the same issue as
MongoDBLookupService.

The second issue is that controller services have an initialize method in
the interface, and initialize is a special function in Ruby that serves as
the constructor. So anyone wanting to do a ScriptedLookupService with JRuby
is going to need to be able to handle something like this:

lookupService = MyService.new nil

with an implementation similar to this:

def initialize(context)
    unless context.nil?
        #Do stuff
    end
end

Thoughts?