You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Sivaprasanna <si...@gmail.com> on 2018/03/19 17:03:41 UTC
onPropertyModified doesn't seem to work
Hi everyone,
I'm facing problem getting onPropertyModified() working. Just to test it
and troubleshoot further, I created a custom processor, the usual
MyProcessor sample processor. I then added the following:
@Override
public void onPropertyModified(PropertyDescriptor descriptor, final
String oldValue, final String newValue) {
LOG.info("Property modified for processor " + this.getIdentifier());
super.onPropertyModified(descriptor, oldValue, newValue);
}
And modified onTrigger to generate a string and write it as an output
flowfile. The processor seems to work. However, when I modify the value for
the property and restart it, I expect the above log statement to be
generated, but it is not. Any help is appreciated. Thanks.
-
Sivaprasanna
Re: onPropertyModified doesn't seem to work
Posted by Sivaprasanna <si...@gmail.com>.
Thank you, Mark. That helped.
On Mon, Mar 19, 2018 at 10:44 PM, Mark Payne <ma...@hotmail.com> wrote:
> Sivaprasanna,
>
> What package is your processor class in? By default, the logging for the
> org.apache.nifi.processors package is set to WARN. I am wondering if you
> are
> simply not seeing the logging because of your logback configuration. I
> would recommend
> you instead add a breakpoint and attach to your running nifi instance.
>
> Thanks
> -Mark
>
>
>
> > On Mar 19, 2018, at 1:03 PM, Sivaprasanna <si...@gmail.com>
> wrote:
> >
> > Hi everyone,
> >
> > I'm facing problem getting onPropertyModified() working. Just to test it
> > and troubleshoot further, I created a custom processor, the usual
> > MyProcessor sample processor. I then added the following:
> >
> > @Override
> > public void onPropertyModified(PropertyDescriptor descriptor, final
> > String oldValue, final String newValue) {
> > LOG.info("Property modified for processor " + this.getIdentifier());
> > super.onPropertyModified(descriptor, oldValue, newValue);
> > }
> >
> > And modified onTrigger to generate a string and write it as an output
> > flowfile. The processor seems to work. However, when I modify the value
> for
> > the property and restart it, I expect the above log statement to be
> > generated, but it is not. Any help is appreciated. Thanks.
> >
> > -
> > Sivaprasanna
>
>
Re: onPropertyModified doesn't seem to work
Posted by Mark Payne <ma...@hotmail.com>.
Sivaprasanna,
What package is your processor class in? By default, the logging for the
org.apache.nifi.processors package is set to WARN. I am wondering if you are
simply not seeing the logging because of your logback configuration. I would recommend
you instead add a breakpoint and attach to your running nifi instance.
Thanks
-Mark
> On Mar 19, 2018, at 1:03 PM, Sivaprasanna <si...@gmail.com> wrote:
>
> Hi everyone,
>
> I'm facing problem getting onPropertyModified() working. Just to test it
> and troubleshoot further, I created a custom processor, the usual
> MyProcessor sample processor. I then added the following:
>
> @Override
> public void onPropertyModified(PropertyDescriptor descriptor, final
> String oldValue, final String newValue) {
> LOG.info("Property modified for processor " + this.getIdentifier());
> super.onPropertyModified(descriptor, oldValue, newValue);
> }
>
> And modified onTrigger to generate a string and write it as an output
> flowfile. The processor seems to work. However, when I modify the value for
> the property and restart it, I expect the above log statement to be
> generated, but it is not. Any help is appreciated. Thanks.
>
> -
> Sivaprasanna