Class PackageFlowFile
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.PackageFlowFile
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor
@SideEffectFree
@SupportsBatching
@InputRequirement(INPUT_REQUIRED)
@Tags({"flowfile","flowfile-stream","flowfile-stream-v3","package","attributes"})
@CapabilityDescription("This processor will package FlowFile attributes and content into an output FlowFile that can be exported from NiFi and imported back into NiFi, preserving the original attributes and content.")
@WritesAttributes(@WritesAttribute(attribute="mime.type",description="The mime.type will be changed to application/flowfile-v3"))
@SeeAlso({UnpackContent.class,MergeContent.class})
@MultiProcessorUseCase(description="Send FlowFile content and attributes from one NiFi instance to another NiFi instance.",notes="A Remote Process Group is preferred to send FlowFiles between two NiFi instances, but an alternative is to use PackageFlowFile then InvokeHTTP sending to ListenHTTP.",keywords={"flowfile","attributes","content","ffv3","flowfile-stream-v3","transfer"},configurations={@ProcessorConfiguration(processorClass=PackageFlowFile.class,configuration=" \"Maximum Batch Size\" > 1 can improve storage or transmission efficiency by batching many FlowFiles together into 1 larger file.\n \"Maximum Batch Content Size\" can be used to enforce a soft upper limit on the overall package size.\n\n Note, that the Batch properties only restrict the maximum amount of FlowFiles to incorporate into a single package.\n In case less FlowFiles are queued than the properties allow for,\n the processor will not wait for the limits to be reached but create smaller packages instead.\n\n Connect the success relationship of PackageFlowFile to the input of InvokeHTTP.\n"),@ProcessorConfiguration(processorClass=InvokeHTTP.class,configuration=" \"HTTP Method\" = \"POST\" to send data to ListenHTTP.\n \"HTTP URL\" should include the hostname, port, and path to the ListenHTTP.\n \"Request Content-Type\" = \"${mime.type}\" because PackageFlowFile output files have attribute mime.type=application/flowfile-v3.\n"),@ProcessorConfiguration(processorClass=ListenHTTP.class,configuration=" \"Listening Port\" = a unique port number.\n\n ListenHTTP automatically unpacks files that have attribute mime.type=application/flowfile-v3.\n If PackageFlowFile batches 99 FlowFiles into 1 file that InvokeHTTP sends, then the original 99 FlowFiles will be output by ListenHTTP.\n")}) @MultiProcessorUseCase(description="Export FlowFile content and attributes from NiFi to external storage and reimport.",keywords={"flowfile","attributes","content","ffv3","flowfile-stream-v3","offline","storage"},configurations={@ProcessorConfiguration(processorClass=PackageFlowFile.class,configuration=" \"Maximum Batch Size\" > 1 can improve storage or transmission efficiency by batching many FlowFiles together into 1 larger file.\n \"Maximum Batch Content Size\" can be used to enforce a soft upper limit on the overall package size.\n\n Note, that the Batch properties only restrict the maximum amount of FlowFiles to incorporate into a single package.\n In case less FlowFiles are queued than the properties allow for,\n the processor will not wait for the limits to be reached but create smaller packages instead.\n\n Connect the success relationship to the input of any NiFi egress processor for offline storage.\n"),@ProcessorConfiguration(processorClass=UnpackContent.class,configuration=" \"Packaging Format\" = \"application/flowfile-v3\".\n\n Connect the output of a NiFi ingress processor that reads files stored offline to the input of UnpackContent.\n If PackageFlowFile batches 99 FlowFiles into 1 file that is read from storage, then the original 99 FlowFiles will be output by UnpackContent.\n")})
public class PackageFlowFile
extends org.apache.nifi.processor.AbstractProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorstatic final Stringprivate static final List<org.apache.nifi.components.PropertyDescriptor> (package private) static final org.apache.nifi.processor.Relationship(package private) static final org.apache.nifi.processor.Relationshipprivate static final Set<org.apache.nifi.processor.Relationship> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.nifi.processor.AbstractProcessor
onTriggerMethods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.processor.Processor
isStateful, migrateProperties, migrateRelationships
-
Field Details
-
BATCHING_BEHAVIOUR_DESCRIPTION
- See Also:
-
BATCH_SIZE
public static final org.apache.nifi.components.PropertyDescriptor BATCH_SIZE -
BATCH_CONTENT_SIZE
public static final org.apache.nifi.components.PropertyDescriptor BATCH_CONTENT_SIZE -
PROPERTY_DESCRIPTORS
-
REL_SUCCESS
static final org.apache.nifi.processor.Relationship REL_SUCCESS -
REL_ORIGINAL
static final org.apache.nifi.processor.Relationship REL_ORIGINAL -
RELATIONSHIPS
-
-
Constructor Details
-
PackageFlowFile
public PackageFlowFile()
-
-
Method Details
-
getRelationships
- Specified by:
getRelationshipsin interfaceorg.apache.nifi.processor.Processor- Overrides:
getRelationshipsin classorg.apache.nifi.processor.AbstractSessionFactoryProcessor
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
onTrigger
public void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) throws org.apache.nifi.processor.exception.ProcessException - Specified by:
onTriggerin classorg.apache.nifi.processor.AbstractProcessor- Throws:
org.apache.nifi.processor.exception.ProcessException
-