nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Ghigiarelli <briang...@gmail.com>
Subject Re: Custom Controller Service Debugging
Date Fri, 14 Aug 2015 12:01:03 GMT
Bryan,

Thank you!! Adding a NAR dependency to my standard-processors NAR did the
trick to get NiFi to recognize the service for these processors and
auto-create a new instance of the Controller Service on template import.  I
owe ya a beer or six the next time our paths cross.

How did you figure out the required NAR dependency? Any great debugging
tricks to share, or was it your existing depth of NiFi knowledge that led
you to that solution?

As a follow-on to that, I'm seeing that Controller Services created via
Template instantiation are created in "Disabled" state.  Is that expected?
Is there any way to drag-and-drop a template with controller services onto
a canvas and have the newly created controller services enabled?

Thanks again,
Brian

On Thu, Aug 13, 2015 at 5:57 PM, Bryan Bende <bbende@gmail.com> wrote:

> Brian,
>
> I just ran into this exact scenario today while testing a custom controller
> service.
>
> The cause of the problem was that my custom service NAR, did not have a NAR
> dependency on the service API NAR because I had accidentally marked the API
> NAR as provided in the pom file. Once I removed the provided scope
> everything worked.
>
> You can check the MANIFEST file in your custom service NAR... under your
> NIFI_HOME/work/nar/extensions/{your-nar}/META-INF/MANIFEST.MF it should
> have a "Nar-Dependency-Id" on your API NAR. If it is missing that, that is
> likely the problem.
>
> -Bryan
>
>
>
> On Thu, Aug 13, 2015 at 5:22 PM, Brian Ghigiarelli <brianghig@gmail.com>
> wrote:
>
> > NiFi Gurus,
> >
> > Regarding Controller Services, I'm seeing some strange behavior
> regarding a
> > custom Controller Service only showing its ID in a Processor and was
> > wondering if anyone's encountered similar issues.  Seeing this on the
> > latest develop branch, 0.3.0-SNAPSHOT.
> >
> > Steps taken:
> > 1. Create instance of Controller Service in the Controller Settings >
> > Controller Services tab
> > 1a. Enable that instance of the Controller Service
> > 2. Add new Processor on canvas that will use Controller Service
> > 3. Configure Processor
> > 3a. Existing Controller Service does not show in property options. Only
> "No
> > value" and "Create new service..."
> > 3b. Clicking "Create new service..." opens modal with the custom
> Controller
> > Service as the only item in the dropdown
> > 3c. Clicking "Create" button succeeds, but puts the UUID of the
> Controller
> > Service in the Value of the Processor Property.
> >
> > Observed state:
> > - Processor is still invalid
> > - The ID in the Processor Property matches the ID of the second
> (disabled)
> > instance of the Controller Service in the Controller Settings modal.
> >
> > There are no errors in nifi-app.log - only contains log messages from the
> > StandardControllerServiceProvider that it "Created Controller Service of
> > type [my-implementation-class] with identifier
> > [UUID-that-shows-in-the-GUI]"
> >
> > Adding a DetectDuplicate processor with the
> > DistributedMapCacheClientService works just fine, so it'd hard to point
> > fingers at the framework.  Any thoughts on where to begin debugging
> and/or
> > loggers to turn up would be greatly appreciated!
> >
> > Thanks,
> > Brian
> >
>



-- 
Brian Ghigiarelli
570-878-9139

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message