[ https://issues.apache.org/jira/browse/NIFI-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16650069#comment-16650069 ]
ASF GitHub Bot commented on NIFI-5629: -------------------------------------- Github user adyoun2 commented on a diff in the pull request: https://github.com/apache/nifi/pull/3033#discussion_r225122894 --- Diff: nifi-mock/src/main/java/org/apache/nifi/util/MockProcessSession.java --- @@ -458,6 +458,9 @@ public MockFlowFile importFrom(final Path path, final boolean keepSourceFile, Fl newFlowFile.setData(baos.toByteArray()); newFlowFile = putAttribute(newFlowFile, CoreAttributes.FILENAME.key(), path.getFileName().toString()); + if (!keepSourceFile) { --- End diff -- It is necessary, in that the mock was ignoring the attribute, so when tested with multiple files, behaviour was non-deterministic, as it could quite easily pick up the same file again. > GetFile becomes slow listing vast directories > --------------------------------------------- > > Key: NIFI-5629 > URL: https://issues.apache.org/jira/browse/NIFI-5629 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions > Affects Versions: 1.6.0 > Reporter: Adam > Priority: Minor > > GetFile repeatedly lists entire directories before applying batching, meaning > for vast directories it spends a long time listing directories. > > Pull request to follow. -- This message was sent by Atlassian JIRA (v7.6.3#76005)