[ 
https://issues.apache.org/jira/browse/NIFI-14361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17949626#comment-17949626
 ] 

David Pfingst commented on NIFI-14361:
--------------------------------------

While working on that issue I found out a little more details:

I am working on a processor that creates relationships for every property that 
is added. When I add the python processor the first time and add some 
properties all the relationships are created and everything works fine. After 
the first run of that processor I can't add any additional properties without 
the validator error mentioned in the issue. If I delete a property I got it 
working that the processor also deletes the relationship.

If I restart the Nifi instance the properties get invalid too. Is Nifi using a 
cached set of the loaded properties?
When I add another property after the restart the newly created property works 
but the old one doesn't.
Is it possible that the reloading process of the python processors is a bit 
buggy? Sometimes my processors are stuck in initializing state and I have to 
restart Nifi then to get them to work again.

This behavior doesn't only occur on my own processor. It can be seen on the 
SetRecordField Processor from the Nifi github repo too.

 

> Python Processor getDynamicPropertyDescriptor not working
> ---------------------------------------------------------
>
>                 Key: NIFI-14361
>                 URL: https://issues.apache.org/jira/browse/NIFI-14361
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 2.2.0, 2.3.0, 2.4.0
>            Reporter: David Pfingst
>            Assignee: Tomasz Korniszuk
>            Priority: Major
>              Labels: Processor, Python
>
> When using "getDynamicPropertyDescriptor" to create dynamic properties, an 
> unexpected behaviour was observed while progamming custom python processors 
> in NiFi 2.2.0.
> If i define the processor with "FlowFileTransform", i can add properties, but 
> sometimes a validation error is thrown. When dynamic properties have been 
> defined and the container is restarted, a validation error is always thrown 
> because the properties cannot be mapped.
> If i define the processor with "RecordTransform", a validation error is 
> thrown immediately as soon as a property is added because, again, the 
> property cannot be mapped. When the container is restarted in this case, all 
> properties can be mapped.
> Both processor have exactly the same code.
>  
> I have defined the properties as follows:
> {code:java}
> def getDynamicPropertyDescriptor(self, name):        
>          return PropertyDescriptor(            
>          name=name,
>          description="Specifies the value to set for the '"+ name +"' field", 
>          
> expression_language_scope=ExpressionLanguageScope.FLOWFILE_ATTRIBUTE,         
>  
>          dynamic=True,            
>          validators = [StandardValidators.ALWAYS_VALID]        
>          ) {code}
> The actual error i get 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
> {{}}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to