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

ASF GitHub Bot commented on NIFI-4184:
--------------------------------------

Github user ijokarumawak commented on the issue:

    https://github.com/apache/nifi/pull/2007
  
    Hi @panelladavide thanks for your contribution!
    
    In order to enable Expression Language, setting expressionLanguageSupported 
to true is not enough. You also need to evaluate the configured EL. Plus, if 
you need to support EL to use FlowFile attribute, you need to pass a FlowFile 
(the incoming FlowFile in most cases) when EL is evaluated.
    
    Specifically, you need to modify changeOwner method:
    - Add EL evaluation like:
         ```
         String owner = 
context.getProperty(REMOTE_OWNER).evaluateAttributeExpressions(flowFile).getValue();
         ```
    - Add FlowFile argument, so that it can be passed to 
`evaluateAttributeExpressions(flowFile)`
    
    
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/PutHDFS.java#L389


>  I needed to put some attributes on REMOTE_GROUP and REMOTE_OWNER in the 
> PutHDFS Processor
> ------------------------------------------------------------------------------------------
>
>                 Key: NIFI-4184
>                 URL: https://issues.apache.org/jira/browse/NIFI-4184
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: dav
>
>  I needed to put some attributes on REMOTE_GROUP and REMOTE_OWNER in order to 
> achieve it i put expressionLanguageSupported(true) on the PropertyDescriptor 
> of REMOTE_GROUP and REMOTE_OWNER



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to