Adds the notion of a RemoteResourceSelector which is a more powerful alternative of the existing RemoteResourceFilter allowing to terminate a listing prematurely.
An improvement to Apache NiFi aims to support listing a configured maximum of remote file resources.
As of now, this can be achieved by providing a RemoteResourceFilter that returns false for all RemoteResourceInfo after the configured threshold has been reached. However, sshj will list all files under the hood nonetheless, which has huge affect on listing performance, especially for directories a with large amount of files.
The PR also resolved a TODO to remove the GOTO that resided in the code touched.
Please let me know if this is a good trajectory for addressing the underlying problem stated or whether it should be addressed differently or any other changes should be incorporated.
Adds the notion of a
RemoteResourceSelector
which is a more powerful alternative of the existingRemoteResourceFilter
allowing to terminate a listing prematurely.An improvement to Apache NiFi aims to support listing a configured maximum of remote file resources. As of now, this can be achieved by providing a
RemoteResourceFilter
that returnsfalse
for allRemoteResourceInfo
after the configured threshold has been reached. However,sshj
will list all files under the hood nonetheless, which has huge affect on listing performance, especially for directories a with large amount of files.The PR also resolved a
TODO
to remove the GOTO that resided in the code touched.Please let me know if this is a good trajectory for addressing the underlying problem stated or whether it should be addressed differently or any other changes should be incorporated.