nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Payne <marka...@hotmail.com>
Subject Re: Question about Mock classes in ControllerServiceInitializer
Date Fri, 01 Jul 2016 12:51:39 GMT
So my guess here is that the controller service or processor or whatever it is that was created
was the one
that logged "Shutting down server" as one of its lifecycle methods, but the Mock Processor
Logger has a bug
where instead of logging the toString() of the Processor or Controller Service that the logger
belongs to,
the logger is logging its own toString(). Does that make sense?


> On Jul 1, 2016, at 8:05 AM, Oleg Zhurakousky <ozhurakousky@hortonworks.com> wrote:
> 
> Joe
> 
> Personally I probably need to look at it more thoroughly to have an intelligent answer,
but one thing I know for sure (or at least I believe. . .) is that if you see any of these
Mock* references in the log when you starting NiFi instance it’s definitely a bug. 
> If that is what you see, I’d suggest to raise JIRA.
> 
> Cheers
> Oleg
> 
>> On Jul 1, 2016, at 7:58 AM, Joe Skora <jskora@gmail.com> wrote:
>> 
>> Mark and Oleg, thanks, it makes sense now.
>> 
>> But, I'm still trying to track down how we have logs containing "... INFO
>> [Finalizer] o.a.n.d.mock.MockProcessorLogger Shutting down server".  It
>> still doesn't seem like that should occur.
>> 
>> 
>> On Thu, Jun 30, 2016 at 6:30 PM, Oleg Zhurakousky <
>> ozhurakousky@hortonworks.com> wrote:
>> 
>>> Guys
>>> 
>>> FWIW, there are discussion points on the WIKI that may be relevant to
>>> understanding of this issue especially in relation to what Mark just stated
>>> 
>>> https://cwiki.apache.org/confluence/display/NIFI/Component+documentation+improvements
>>> 
>>> There are also some points in the Extension Registry (linked from the link
>>> above).
>>> There is also an open JIRA with some more info:
>>> https://issues.apache.org/jira/browse/NIFI-1384
>>> 
>>> I think in reality if we declare (what is now obvious) a convention that
>>> PropertyDescriptors, Relationships etc. all have to be static variables
>>> then we would not need to create throw-away instances of class just to get
>>> their documentation.
>>> Anyway, something to think about. . .
>>> 
>>> Cheers
>>> Oleg
>>> 
>>> On Jun 30, 2016, at 1:59 PM, Mark Payne <markap14@hotmail.com<mailto:
>>> markap14@hotmail.com>> wrote:
>>> 
>>> Joe,
>>> 
>>> I think the nifi-documentation module is using that to instantiate
>>> Processors, Controller Services, etc.
>>> so that it can inspect their annotations & call their
>>> getPropertyDescriptors() methods, etc. when it generates
>>> documentation for the component. Those should not be used for any
>>> component that is added to the flow.
>>> 
>>> 
>>> 
>>> On Jun 30, 2016, at 1:32 PM, Joe Skora <jskora@gmail.com<mailto:
>>> jskora@gmail.com>> wrote:
>>> 
>>> Brandon and I have both run into log entries saying something along the
>>> lines of "o.a.n.d.mock.MockProcessorLogger Shutting down server".
>>> 
>>> Checking the code
>>> <
>>> https://github.com/apache/nifi/blob/release-nifi-0.3.0-rc1/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-documentation/src/main/java/org/apache/nifi/documentation/init/ControllerServiceInitializer.java#L52
>>>> ,
>>> there are references to the MockProcessorLogger and
>>> MockConfigurationContext
>>> in the org.apache.nifi.documentation.init.ControllerServiceInitizer,
>>> ProcessorInitializer, and ReportingTaskingInitializer classes.
>>> 
>>> What are we missing?  Why are there Mock framework classes used in regular
>>> classes?
>>> 
>>> 
>>> 
>>> 
> 


Mime
View raw message