You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Поротиков Станислав Вяч еславович <s....@skbkontur.ru.INVALID> on 2024/02/29 05:41:54 UTC

Python processor dynamic property failure

Hello!
I wrote Python processor for NiFi 2.0 and it worked fine.
Bun after a while it started to crush with validation error about dynamic property

I defined dynamic property like this:

    def getDynamicPropertyDescriptor(self, name):
        return PropertyDescriptor(
            name=name,
            description="Specifies the column with '" + name + "' key",
            expression_language_scope=ExpressionLanguageScope.FLOWFILE_ATTRIBUTES,
            validators = [StandardValidators.ALWAYS_VALID]
        )

The actual error I see in interface is: "<DYNAMIC_PROPERTY_NAME>  against '< DYNAMIC_PROPERTY_VALUE>' is invalid because "<DYNAMIC_PROPERTY_NAME> is not supported property or has no Validator associated with it"

Glad to any help.


Re: Python processor dynamic property failure

Posted by Fan Li <fa...@apex974.com>.
Hi Mark, I encountered this issue when adding a new dynamic property (NiFi
2.0.0-M2). However, I didn't see any error messages in nifi-*.log
files.Thanks!

[image: image.png]

On Thu, Feb 29, 2024 at 11:19 AM Mark Payne <ma...@hotmail.com> wrote:

> Hey Stanislav, Fan,
>
> Any chance you’re seeing any errors in the logs? Either in nifi-app.log,
> nifi-python.log, or nifi-bootstrap.log?
> I don’t know that I’ve seen this issue specifically, but I suspect that
> this has already been addressed since M2. In particular, I suspect that it
> was addressed by NIFI-12740 [1]. We found that sometimes the Python side
> will return a reference to a Java object (for example, a validator) but
> then it would be cleaned up on the Java side before it’s been referenced.
>
> If you’ve got any particular errors in the logs, that may help to verify
> that this is the issue.
>
> Thanks
> -Mark
>
>
> [1] https://issues.apache.org/jira/browse/NIFI-12740
>
> > On Feb 29, 2024, at 6:18 AM, Поротиков Станислав Вячеславович <
> s.porotikov@skbkontur.ru.INVALID> wrote:
> >
> > Actually I can fix it just recreating processor by copy-paste. But
> doesn't really solve the problem.
> >
> > Best regards,
> > Stanislav Porotikov
> >
> >
> > -----Original Message-----
> > From: Fan Li <fa...@apex974.com>
> > Sent: Thursday, February 29, 2024 4:15 PM
> > To: dev@nifi.apache.org
> > Subject: Re: Python processor dynamic property failure
> >
> > I have seen similar errors as well. If I restart NiFi, the error goes
> away.
> > Appreciate any guidance.
> >
> > On Thu, Feb 29, 2024 at 12:43 AM Поротиков Станислав Вячеславович <
> s.porotikov@skbkontur.ru.invalid> wrote:
> >
> >> Hello!
> >> I wrote Python processor for NiFi 2.0 and it worked fine.
> >> Bun after a while it started to crush with validation error about
> >> dynamic property
> >>
> >> I defined dynamic property like this:
> >>
> >>    def getDynamicPropertyDescriptor(self, name):
> >>        return PropertyDescriptor(
> >>            name=name,
> >>            description="Specifies the column with '" + name + "'
> >> key",
> >>
> >> expression_language_scope=ExpressionLanguageScope.FLOWFILE_ATTRIBUTES,
> >>            validators = [StandardValidators.ALWAYS_VALID]
> >>        )
> >>
> >> The actual error I see in interface is: "<DYNAMIC_PROPERTY_NAME>
> >> against '< DYNAMIC_PROPERTY_VALUE>' is invalid because
> >> "<DYNAMIC_PROPERTY_NAME> is not supported property or has no Validator
> associated with it"
> >>
> >> Glad to any help.
> >>
> >>
>
>

Re: Python processor dynamic property failure

Posted by Mark Payne <ma...@hotmail.com>.
Hey Stanislav, Fan,

Any chance you’re seeing any errors in the logs? Either in nifi-app.log, nifi-python.log, or nifi-bootstrap.log?
I don’t know that I’ve seen this issue specifically, but I suspect that this has already been addressed since M2. In particular, I suspect that it was addressed by NIFI-12740 [1]. We found that sometimes the Python side will return a reference to a Java object (for example, a validator) but then it would be cleaned up on the Java side before it’s been referenced.

If you’ve got any particular errors in the logs, that may help to verify that this is the issue.

Thanks
-Mark


[1] https://issues.apache.org/jira/browse/NIFI-12740

> On Feb 29, 2024, at 6:18 AM, Поротиков Станислав Вячеславович <s....@skbkontur.ru.INVALID> wrote:
> 
> Actually I can fix it just recreating processor by copy-paste. But doesn't really solve the problem.
> 
> Best regards,
> Stanislav Porotikov
> 
> 
> -----Original Message-----
> From: Fan Li <fa...@apex974.com> 
> Sent: Thursday, February 29, 2024 4:15 PM
> To: dev@nifi.apache.org
> Subject: Re: Python processor dynamic property failure
> 
> I have seen similar errors as well. If I restart NiFi, the error goes away.
> Appreciate any guidance.
> 
> On Thu, Feb 29, 2024 at 12:43 AM Поротиков Станислав Вячеславович <s....@skbkontur.ru.invalid> wrote:
> 
>> Hello!
>> I wrote Python processor for NiFi 2.0 and it worked fine.
>> Bun after a while it started to crush with validation error about 
>> dynamic property
>> 
>> I defined dynamic property like this:
>> 
>>    def getDynamicPropertyDescriptor(self, name):
>>        return PropertyDescriptor(
>>            name=name,
>>            description="Specifies the column with '" + name + "' 
>> key",
>> 
>> expression_language_scope=ExpressionLanguageScope.FLOWFILE_ATTRIBUTES,
>>            validators = [StandardValidators.ALWAYS_VALID]
>>        )
>> 
>> The actual error I see in interface is: "<DYNAMIC_PROPERTY_NAME>  
>> against '< DYNAMIC_PROPERTY_VALUE>' is invalid because 
>> "<DYNAMIC_PROPERTY_NAME> is not supported property or has no Validator associated with it"
>> 
>> Glad to any help.
>> 
>> 


RE: Python processor dynamic property failure

Posted by Поротиков Станислав Вяч еславович <s....@skbkontur.ru.INVALID>.
Actually I can fix it just recreating processor by copy-paste. But doesn't really solve the problem.

Best regards,
Stanislav Porotikov


-----Original Message-----
From: Fan Li <fa...@apex974.com> 
Sent: Thursday, February 29, 2024 4:15 PM
To: dev@nifi.apache.org
Subject: Re: Python processor dynamic property failure

I have seen similar errors as well. If I restart NiFi, the error goes away.
Appreciate any guidance.

On Thu, Feb 29, 2024 at 12:43 AM Поротиков Станислав Вячеславович <s....@skbkontur.ru.invalid> wrote:

> Hello!
> I wrote Python processor for NiFi 2.0 and it worked fine.
> Bun after a while it started to crush with validation error about 
> dynamic property
>
> I defined dynamic property like this:
>
>     def getDynamicPropertyDescriptor(self, name):
>         return PropertyDescriptor(
>             name=name,
>             description="Specifies the column with '" + name + "' 
> key",
>
> expression_language_scope=ExpressionLanguageScope.FLOWFILE_ATTRIBUTES,
>             validators = [StandardValidators.ALWAYS_VALID]
>         )
>
> The actual error I see in interface is: "<DYNAMIC_PROPERTY_NAME>  
> against '< DYNAMIC_PROPERTY_VALUE>' is invalid because 
> "<DYNAMIC_PROPERTY_NAME> is not supported property or has no Validator associated with it"
>
> Glad to any help.
>
>

Re: Python processor dynamic property failure

Posted by Fan Li <fa...@apex974.com>.
I have seen similar errors as well. If I restart NiFi, the error goes away.
Appreciate any guidance.

On Thu, Feb 29, 2024 at 12:43 AM Поротиков Станислав Вячеславович
<s....@skbkontur.ru.invalid> wrote:

> Hello!
> I wrote Python processor for NiFi 2.0 and it worked fine.
> Bun after a while it started to crush with validation error about dynamic
> property
>
> I defined dynamic property like this:
>
>     def getDynamicPropertyDescriptor(self, name):
>         return PropertyDescriptor(
>             name=name,
>             description="Specifies the column with '" + name + "' key",
>
> expression_language_scope=ExpressionLanguageScope.FLOWFILE_ATTRIBUTES,
>             validators = [StandardValidators.ALWAYS_VALID]
>         )
>
> The actual error I see in interface is: "<DYNAMIC_PROPERTY_NAME>  against
> '< DYNAMIC_PROPERTY_VALUE>' is invalid because "<DYNAMIC_PROPERTY_NAME> is
> not supported property or has no Validator associated with it"
>
> Glad to any help.
>
>