Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
This Property is only considered if the [Merge Strategy] Property has a value of "Bin-Packing Algorithm".Metadata Strategy | mergecontent-metadata-strategy | Do Not Merge Uncommon Metadata | - Use First Metadata
- Keep Only Common Metadata
- Do Not Merge Uncommon Metadata
- Ignore Metadata
| For FlowFiles whose input format supports metadata (Avro, e.g.), this property determines which metadata should be added to the bundle. If 'Use First Metadata' is selected, the metadata keys/values from the first FlowFile to be bundled will be used. If 'Keep Only Common Metadata' is selected, only the metadata that exists on all FlowFiles in the bundle, with the same value, will be preserved. If 'Ignore Metadata' is selected, no metadata is transferred to the outgoing bundled FlowFile. If 'Do Not Merge Uncommon Metadata' is selected, any FlowFile whose metadata values do not match those of the first bundled FlowFile will not be merged.
This Property is only considered if the [Merge Format] Property has a value of "Avro". |
Minimum Number of Entries | Minimum Number of Entries | 1 | | The minimum number of files to include in a bundle
This Property is only considered if the [Merge Strategy] Property has a value of "Bin-Packing Algorithm". |
Maximum Number of Entries | Maximum Number of Entries | 1000 | | The maximum number of files to include in a bundle
This Property is only considered if the [Merge Strategy] Property has a value of "Bin-Packing Algorithm". |
Minimum Group Size | Minimum Group Size | 0 B | | The minimum size for the bundle
This Property is only considered if the [Merge Strategy] Property has a value of "Bin-Packing Algorithm". |
Maximum Group Size | Maximum Group Size | | | The maximum size for the bundle. If not specified, there is no maximum.
This Property is only considered if the [Merge Strategy] Property has a value of "Bin-Packing Algorithm". |
Max Bin Age | Max Bin Age | | | The maximum age of a Bin that will trigger a Bin to be complete. Expected format is <duration> <time unit> where <duration> is a positive integer and time unit is one of seconds, minutes, hours |
Maximum number of Bins | Maximum number of Bins | 5 | | Specifies the maximum number of bins that can be held in memory at any one time |
Delimiter Strategy | Delimiter Strategy | Do Not Use Delimiters | - Do Not Use Delimiters
- Filename
- Text
| Determines if Header, Footer, and Demarcator should point to files containing the respective content, or if the values of the properties should be used as the content.
This Property is only considered if the [Merge Format] Property has a value of "Binary Concatenation". |
Header | Header File | | | Filename or text specifying the header to use. If not specified, no header is supplied.
This property requires exactly one resource to be provided. That resource may be any of the following types: file, text.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
This Property is only considered if all of the following conditions are met:- The [Delimiter Strategy] Property is set to one of the following values: [Filename], [Text]
- The [Merge Format] Property has a value of "Binary Concatenation".
|
Footer | Footer File | | | Filename or text specifying the footer to use. If not specified, no footer is supplied.
This property requires exactly one resource to be provided. That resource may be any of the following types: file, text.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
This Property is only considered if all of the following conditions are met:- The [Delimiter Strategy] Property is set to one of the following values: [Filename], [Text]
- The [Merge Format] Property has a value of "Binary Concatenation".
|
Demarcator | Demarcator File | | | Filename or text specifying the demarcator to use. If not specified, no demarcator is supplied.
This property requires exactly one resource to be provided. That resource may be any of the following types: file, text.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
This Property is only considered if all of the following conditions are met:- The [Delimiter Strategy] Property is set to one of the following values: [Filename], [Text]
- The [Merge Format] Property has a value of "Binary Concatenation".
|
Compression Level | Compression Level | 1 | | Specifies the compression level to use when using the Zip Merge Format; if not using the Zip Merge Format, this value is ignored
This Property is only considered if the [Merge Format] Property has a value of "ZIP". |
Keep Path | Keep Path | false | | If using the Zip or Tar Merge Format, specifies whether or not the FlowFiles' paths should be included in their entry names.
This Property is only considered if the [Merge Format] Property is set to one of the following values: [ZIP], [TAR] |
Tar Modified Time | Tar Modified Time | ${file.lastModifiedTime} | | If using the Tar Merge Format, specifies if the Tar entry should store the modified timestamp either by expression (e.g. ${file.lastModifiedTime} or static value, both of which must match the ISO8601 format 'yyyy-MM-dd'T'HH:mm:ssZ'. Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
This Property is only considered if the [Merge Format] Property has a value of "TAR". |
Relationships:
Name | Description |
---|
failure | If the bundle cannot be created, all FlowFiles that would have been used to created the bundle will be transferred to failure |
original | The FlowFiles that were used to create the bundle |
merged | The FlowFile containing the merged content |
Reads Attributes:
Name | Description |
---|
fragment.identifier | Applicable only if the <Merge Strategy> property is set to Defragment. All FlowFiles with the same value for this attribute will be bundled together. |
fragment.index | Applicable only if the <Merge Strategy> property is set to Defragment. This attribute indicates the order in which the fragments should be assembled. This attribute must be present on all FlowFiles when using the Defragment Merge Strategy and must be a unique (i.e., unique across all FlowFiles that have the same value for the "fragment.identifier" attribute) integer between 0 and the value of the fragment.count attribute. If two or more FlowFiles have the same value for the "fragment.identifier" attribute and the same value for the "fragment.index" attribute, the first FlowFile processed will be accepted and subsequent FlowFiles will not be accepted into the Bin. |
fragment.count | Applicable only if the <Merge Strategy> property is set to Defragment. This attribute indicates how many FlowFiles should be expected in the given bundle. At least one FlowFile must have this attribute in the bundle. If multiple FlowFiles contain the "fragment.count" attribute in a given bundle, all must have the same value. |
segment.original.filename | Applicable only if the <Merge Strategy> property is set to Defragment. This attribute must be present on all FlowFiles with the same value for the fragment.identifier attribute. All FlowFiles in the same bundle must have the same value for this attribute. The value of this attribute will be used for the filename of the completed merged FlowFile. |
tar.permissions | Applicable only if the <Merge Format> property is set to TAR. The value of this attribute must be 3 characters; each character must be in the range 0 to 7 (inclusive) and indicates the file permissions that should be used for the FlowFile's TAR entry. If this attribute is missing or has an invalid value, the default value of 644 will be used |
Writes Attributes:
Name | Description |
---|
filename | When more than 1 file is merged, the filename comes from the segment.original.filename attribute. If that attribute does not exist in the source FlowFiles, then the filename is set to the number of nanoseconds matching system time. Then a filename extension may be applied:if Merge Format is TAR, then the filename will be appended with .tar, if Merge Format is ZIP, then the filename will be appended with .zip, if Merge Format is FlowFileStream, then the filename will be appended with .pkg |
merge.count | The number of FlowFiles that were merged into this bundle |
merge.bin.age | The age of the bin, in milliseconds, when it was merged and output. Effectively this is the greatest amount of time that any FlowFile in this bundle remained waiting in this processor before it was output |
merge.uuid | UUID of the merged flow file that will be added to the original flow files attributes. |
merge.reason | This processor allows for several thresholds to be configured for merging FlowFiles. This attribute indicates which of the Thresholds resulted in the FlowFiles being merged. For an explanation of each of the possible values and their meanings, see the Processor's Usage / documentation and see the 'Additional Details' page. |
State management:
This component does not store state.Restricted:
This component is not restricted.Input requirement:
This component requires an incoming relationship.System Resource Considerations:
Resource | Description |
---|
MEMORY | While content is not stored in memory, the FlowFiles' attributes are. The configuration of MergeContent (maximum bin size, maximum group size, maximum bin age, max number of entries) will influence how much memory is used. If merging together many small FlowFiles, a two-stage approach may be necessary in order to avoid excessive use of memory. |
See Also:
SegmentContent, MergeRecord