- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Order of files Tared in MergeContent processor
- Labels:
-
Apache NiFi
Created ‎03-12-2017 11:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to set an order to the files Tared in a merge content processor, is this possible somehow?
I need the order of the binary bits to be set so that one file (based on filename) can always be first.
In this case I need the testfile1.txt to be first and then then testfile2.txt to be second.
It seems to ignore my priorityattrbribute prioritizer.
Thank you!
Created on ‎03-13-2017 02:26 PM - edited ‎08-18-2019 05:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The PriorityAttributePrioritizer controls the order in which FlowFiles on a queue are read for processing by the next processor in a dataflow. In your case that next processor is a MergeContent processor which just places the FlowFile in a Bin and move on to the next priority FlowFile. There is no definable merging order with the TAR format in the NiFi MergeContent processor.
If you know the exact number of fragments that are going in to your bundle, you could try setting the fragment identifiers on the incoming FlowFiles to force a merging order.
This would require you to change your merge strategy to "Defragment".
Thanks, Matt
Created on ‎03-13-2017 02:26 PM - edited ‎08-18-2019 05:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The PriorityAttributePrioritizer controls the order in which FlowFiles on a queue are read for processing by the next processor in a dataflow. In your case that next processor is a MergeContent processor which just places the FlowFile in a Bin and move on to the next priority FlowFile. There is no definable merging order with the TAR format in the NiFi MergeContent processor.
If you know the exact number of fragments that are going in to your bundle, you could try setting the fragment identifiers on the incoming FlowFiles to force a merging order.
This would require you to change your merge strategy to "Defragment".
Thanks, Matt
Created ‎03-13-2017 04:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!! That worked perfectly! Feel free to check out my NiFi template where this is in use!
