Member since
12-10-2019
8
Posts
0
Kudos Received
0
Solutions
12-29-2019
08:42 PM
@ask_bill_brooks , Sorry, i am not seeing the accept as solution option in my screen. Thanks.
... View more
12-23-2019
09:55 PM
@MattWho , Thank you for the details. I can understand your point that same file cannot be accessed across cluster nodes. But, I am using Nifi is single node (without cluster) and was thinking that this should work. Yes, i do use "Update Attribute" with the below file name conventions. This generates separate flow file for every message. I am trying to have this as one single file per node. ${filename:replace(${filename},"FileName_"):append(${now():format("yyyy-MM-dd-HH-mm-ss")})}.Json Thank you
... View more
12-23-2019
10:12 AM
@Siraj Does your ConsumeMQTT processor produce all output FlowFIles with the same Filename? Your MergeContent processor will merge if both configured min settings are satisfied at the end of execution. If you have your MergeContent processor configured to run as fast as possible (run schedule set to 0 sec default). It may upon execution only see one FlowFile on incoming connection at that moment in time and put only one FlowFile in a bin and merge just that one FlowFile since you set your min num entries to "1". I suggest you edit your MergeContent as follows: 1. Configure "Correlation Attribute Name" to "filename". 2. Perhaps increase your min setting from 1 to some higher value. 3. Always set "Max Bin Age". (This is your forced merge property, it will force a bin to merge even if it has not reach both min values within this configured amount of time.) 4. Make sure you have enough bins to accommodate the expected number of unique filenames plus 1 extra. (If all bins have allocated FlowFiles to them and the next FlowFile cannot be added to an existing bin, the oldest bin will be forced to merge to free a bin). The NiFi putFile processor does not support append. Append actions can cause all kinds of issue especially with a NiFi cluster where the target directory of the putFile is mounted to all the NiFi nodes. You can't have multiple nodes trying to write/append to the same file at the same time. My suggestion would be to use the UpdateAttribute processor before your putFile to modify the filename attribute. Perhaps prepend a uuid to the filename to ensure uniqueness across multiple files or NiFi nodes (if clustered). ${UUID()}-${filename} Hope this helps you, Matt
... View more