[
https://issues.apache.org/jira/browse/NIFI-10532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608844#comment-17608844
]
Joe Witt commented on NIFI-10532:
---------------------------------
Hello
it would never group them by their values. As a flowfile comes in it will
decide what to do such as using an existing connection because the values match
vs making a new one since they changed such as host/username/etc..
This approach is not efficient. I recommend running two different PutFTP
processors and not using flowfile attributes for these values if
efficiency/batching is desired. In any case at times this model is convenient
and so we do want it to work. The bug is likely in
https://github.com/apache/nifi/blob/main/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java#L547-L559
where we're only validating that the hostname hasn't changed. We need to
validate the user hasn't changed, etc.. Will look more but that jumps out.
> PutFTP does not group the batch by user name
> --------------------------------------------
>
> Key: NIFI-10532
> URL: https://issues.apache.org/jira/browse/NIFI-10532
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 1.17.0, 1.16.1
> Reporter: Christoph Langheld
> Priority: Major
> Attachments: 01-PutFTP-ProcessGroup.png, 02-PutFTP-Setting.png,
> 03-PutFTP-Result.png, PutFTP-Bug.xml
>
>
> Hello,
> for the PutFTP processor we set the host, name, password, port, and target
> directory dynamically via UpdateAttribute.
> We now have the problem, that the PutFTP processor transmits every file with
> the same user even the ftp user name changed. The target host does not
> change, only the user.
> To reproduce I attached a process group as template ([^PutFTP-Bug.xml]). You
> have to adapt the ftp server settings within the UpdateAttribute processor to
> your environment.
> The process group generates 50 flow files.
> UpdateAttribute sets the ftp user credentials and sets a filename prefix
> (NIFI-A_ respectively NIFI-B_).
> If everything would work correctly all files with prefix NIFI-A_ should be
> transfered to the ftp server as user nifi-a and the rest as user nifi-b.
> But every file will be transferred as the same user (nifi-a).
> PutFTP should group the batch by host, login credentials (user, password,
> port) and target directory.
> !01-PutFTP-ProcessGroup.png|width=639,height=607!
> PutFTP settings:
> !02-PutFTP-Setting.png|width=750,height=523!
> Result on the ftp server (logged in as user nifi-a):
> !03-PutFTP-Result.png|width=268,height=482!
>
> Thank you and regards
> Christoph
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)