From cefc02c5fb04451026a5f8d84e8fb56625468284 Mon Sep 17 00:00:00 2001 From: Andre F de Miranda Date: Thu, 23 Feb 2017 00:28:09 +1100 Subject: [PATCH] NIFI-3514 - Ensures ListGCSBucket triggers serially and forbids inputs This closes #1526. Signed-off-by: James Wing --- .../apache/nifi/processors/gcp/storage/ListGCSBucket.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/storage/ListGCSBucket.java b/nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/storage/ListGCSBucket.java index 8998953728..4af4ae2d60 100644 --- a/nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/storage/ListGCSBucket.java +++ b/nifi-nar-bundles/nifi-gcp-bundle/nifi-gcp-processors/src/main/java/org/apache/nifi/processors/gcp/storage/ListGCSBucket.java @@ -22,6 +22,10 @@ import com.google.cloud.storage.Blob; import com.google.cloud.storage.BlobInfo; import com.google.cloud.storage.Storage; import com.google.common.collect.ImmutableList; +import org.apache.nifi.annotation.behavior.InputRequirement; +import org.apache.nifi.annotation.behavior.InputRequirement.Requirement; +import org.apache.nifi.annotation.behavior.TriggerSerially; +import org.apache.nifi.annotation.behavior.TriggerWhenEmpty; import org.apache.nifi.annotation.behavior.Stateful; import org.apache.nifi.annotation.behavior.WritesAttribute; import org.apache.nifi.annotation.behavior.WritesAttributes; @@ -98,6 +102,9 @@ import static org.apache.nifi.processors.gcp.storage.StorageAttributes.URI_DESC; /** * List objects in a google cloud storage bucket by object name pattern. */ +@TriggerSerially +@TriggerWhenEmpty +@InputRequirement(Requirement.INPUT_FORBIDDEN) @Tags({"google cloud", "google", "storage", "gcs", "list"}) @CapabilityDescription("Retrieves a listing of objects from an GCS bucket. For each object that is listed, creates a FlowFile that represents " + "the object so that it can be fetched in conjunction with FetchGCSObject. This Processor is designed to run on Primary Node only "