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 help improve performance by batching many flowfiles together into 1 larger file that is transmitted by InvokeHTTP.\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 efficiency by batching many FlowFiles together into 1 larger file that is stored.\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

    Fields
    Modifier and Type
    Field
    Description
    static final org.apache.nifi.components.PropertyDescriptor
     
    private 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.Relationship
     
    private static final Set<org.apache.nifi.processor.Relationship>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Set<org.apache.nifi.processor.Relationship>
     
    protected List<org.apache.nifi.components.PropertyDescriptor>
     
    void
    onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session)
     

    Methods inherited from class org.apache.nifi.processor.AbstractProcessor

    onTrigger

    Methods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor

    getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue

    Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent

    customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.nifi.components.ConfigurableComponent

    getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.processor.Processor

    isStateful, migrateProperties, migrateRelationships
  • Field Details

    • BATCH_SIZE

      public static final org.apache.nifi.components.PropertyDescriptor BATCH_SIZE
    • PROPERTIES

      private static final List<org.apache.nifi.components.PropertyDescriptor> PROPERTIES
    • REL_SUCCESS

      static final org.apache.nifi.processor.Relationship REL_SUCCESS
    • REL_ORIGINAL

      static final org.apache.nifi.processor.Relationship REL_ORIGINAL
    • RELATIONSHIPS

      private static final Set<org.apache.nifi.processor.Relationship> RELATIONSHIPS
  • Constructor Details

    • PackageFlowFile

      public PackageFlowFile()
  • Method Details

    • getRelationships

      public Set<org.apache.nifi.processor.Relationship> getRelationships()
      Specified by:
      getRelationships in interface org.apache.nifi.processor.Processor
      Overrides:
      getRelationships in class org.apache.nifi.processor.AbstractSessionFactoryProcessor
    • getSupportedPropertyDescriptors

      protected List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
      Overrides:
      getSupportedPropertyDescriptors in class org.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:
      onTrigger in class org.apache.nifi.processor.AbstractProcessor
      Throws:
      org.apache.nifi.processor.exception.ProcessException