This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 5d56f553b0 NIFI-14095 Updated GetFile default Polling Interval to 30
seconds (#10618)
5d56f553b0 is described below
commit 5d56f553b04dfdfae5d7d48c48de48efe6b4fdbf
Author: Michael Moser <[email protected]>
AuthorDate: Tue Dec 9 16:28:51 2025 -0500
NIFI-14095 Updated GetFile default Polling Interval to 30 seconds (#10618)
Signed-off-by: David Handermann <[email protected]>
---
.../apache/nifi/processors/standard/GetFile.java | 24 +++++++++++++---------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetFile.java
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetFile.java
index 49735ee404..c92f00ec7d 100644
---
a/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetFile.java
+++
b/nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetFile.java
@@ -73,7 +73,10 @@ import java.util.regex.Pattern;
@TriggerWhenEmpty
@InputRequirement(Requirement.INPUT_FORBIDDEN)
@Tags({"local", "files", "filesystem", "ingest", "ingress", "get", "source",
"input"})
-@CapabilityDescription("Creates FlowFiles from files in a directory. NiFi
will ignore files it doesn't have at least read permissions for.")
+@CapabilityDescription("""
+ Reads files from a directory and streams them into the contents of new
FlowFiles.
+ NiFi will ignore files it doesn't have at least read permissions for.
+""")
@WritesAttributes({
@WritesAttribute(attribute = "filename", description = "The filename is
set to the name of the file on disk"),
@WritesAttribute(attribute = "path", description = "The path is set to the
relative path of the file's directory on disk. For example, "
@@ -119,10 +122,12 @@ public class GetFile extends AbstractProcessor {
.build();
public static final PropertyDescriptor KEEP_SOURCE_FILE = new
PropertyDescriptor.Builder()
.name("Keep Source File")
- .description("If true, the file is not deleted after it has been
copied to the Content Repository; "
- + "this causes the file to be picked up continually and is
useful for testing purposes. "
- + "If not keeping original NiFi will need write
permissions on the directory it is pulling "
- + "from otherwise it will ignore the file.")
+ .description("""
+ If true, the file is not deleted after it has been copied
to the Content Repository;
+ this causes the file to be picked up continually and is
useful for testing purposes.
+ If not keeping the source file, NiFi will need write
permissions on the directory
+ where the file is located in order to delete it; otherwise
the file will be ignored.
+ """)
.required(true)
.allowableValues("true", "false")
.defaultValue("false")
@@ -175,10 +180,12 @@ public class GetFile extends AbstractProcessor {
.build();
public static final PropertyDescriptor POLLING_INTERVAL = new
PropertyDescriptor.Builder()
.name("Polling Interval")
- .description("Indicates how long to wait before performing a
directory listing")
+ .description("""
+ Indicates the amount of time between performing directory
listings to find new files
+ that appear in the Input Directory""")
.required(true)
.addValidator(StandardValidators.TIME_PERIOD_VALIDATOR)
- .defaultValue("0 sec")
+ .defaultValue("30 sec")
.build();
public static final PropertyDescriptor BATCH_SIZE = new
PropertyDescriptor.Builder()
.name("Batch Size")
@@ -420,9 +427,6 @@ public class GetFile extends AbstractProcessor {
final Path filePath = file.toPath();
final Path relativePath =
directoryPath.relativize(filePath.getParent());
String relativePathString = relativePath.toString() + "/";
- if (relativePathString.isEmpty()) {
- relativePathString = "./";
- }
final Path absPath = filePath.toAbsolutePath();
final String absPathString = absPath.getParent().toString() +
"/";