NIFI-3514 - Ensures ListGCSBucket triggers serially and forbids inputs

This closes #1526.

Signed-off-by: James Wing <jvwing@gmail.com>
This commit is contained in:
Andre F de Miranda 2017-02-23 00:28:09 +11:00 committed by James Wing
parent 96ed405d70
commit cefc02c5fb
1 changed files with 7 additions and 0 deletions

View File

@ -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 "