-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIFI-12772 Expose REMOTE_POLL_BATCH_SIZE property for ListSFTP #8390
Conversation
Need to do some manual testing |
826b907
to
85a269d
Compare
Thank you for working on this @tombrisland. I haven't had time to do any testing, but just glanced over the code changes and they look straightforward. It seems that even though the However, I wonder if it makes sense to move the existing max result check if (listing.size() >= maxResults) {
return false;
} to the top of the What do you think about that? |
Makes sense to me @EndzeitBegins, would also be great if we can get your early termination support in! We may also need to have a think about which tracking strategies are supported when you select batch size. E.g. I don't think that time tracking will work with batch size since it relies on keeping track of the last timestamp processed? |
85a269d
to
8fbc42f
Compare
Thank you for the adjustments. That's a very sensible remark. I think it makes sense to limit the support for |
8fbc42f
to
cfef828
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this change @tombrisland, and thanks for the feedback thus far @EndzeitBegins.
Regarding making the property dependent, this should not be changed in FileTransfer
because it also impacts ListFTP
and GetFTP
.
It does not seem necessary to make it dependent, because those other strategies could still work under some circumstances. The fact that it is not currently a dependent property for the FTP Processors is also worth noting, so at least for the initial change, it seems better to avoid making it a dependent property.
...i-file-transfer/src/main/java/org/apache/nifi/processor/util/file/transfer/FileTransfer.java
Outdated
Show resolved
Hide resolved
I don't have a lot to add to the comments I see already. But the main gist is if the intent of the JIRA is now broader than the original title please change the JIRA. If the intent has not changed then please narrow the PR. So either this is about adding this option to ListSFTP or it is about others. Would be important to validate each case which expands the scope of the review. Given we don't actually get to, it appears, change the behavior of the SFTP commands executed on the remote end (ie: once you start a listing in a large directory...much of the damage is already done in terms of time/waiting) then the benefit of this property being available is mostly to protect the NiFi side. Still useful just probably not the truly desired/most beneficial impact. I'd avoid any changes for now that aren't central to the specific desired improvement. |
cfef828
to
304d2b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @tombrisland. I noticed one import that no longer seems necessary, and a had a question on one other relocation.
Also, if you could do this change as a regular push, instead of a force-push, that would be helpful for tracking. The initial PR should have a single commit, but after the review process is complete, then all the changes will be squashed into a single commit for merging into the main branch.
...i-file-transfer/src/main/java/org/apache/nifi/processor/util/file/transfer/FileTransfer.java
Outdated
Show resolved
Hide resolved
...standard-processors/src/main/java/org/apache/nifi/processors/standard/util/SFTPTransfer.java
Outdated
Show resolved
Hide resolved
Thanks for taking on the merge process @joewitt. |
@EndzeitBegins It would need a separate JIRA/PR would be needed and I dont think the 'removeIf' language mechanism would work as NiFi 1.x is Java 8 or higher. |
Thank you for the fast response @joewitt and letting me know. Hey @tombrisland, are you interested to work on a backport for 1.x or should I have a go at it? |
Summary
NIFI-12772
Allows use of the REMOTE_POLL_BATCH_SIZE property in the ListSFTP processor. Previously this was supported but not exposed for configuration.
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000
NIFI-00000
Pull Request Formatting
main
branchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-check
Licensing
LICENSE
andNOTICE
filesDocumentation