Member since
07-30-2019
3397
Posts
1619
Kudos Received
1001
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 459 | 11-05-2025 11:01 AM | |
| 360 | 11-05-2025 08:01 AM | |
| 520 | 11-04-2025 10:16 AM | |
| 708 | 10-20-2025 06:29 AM | |
| 848 | 10-10-2025 08:03 AM |
01-10-2017
01:40 PM
1 Kudo
@Joshua Adeleke You could extract the header bits from the first two lines into FlowFile attributes before the SplitText processor. All the FlowFiles that come out of the SplitText processor will all get these new FlowFile attributes as well. You can then use the FlowFile Attributes in your PutSQL.
... View more
01-10-2017
01:31 PM
1 Kudo
@Avish Saha The behavior you should be seeing here is that the mergeContent processor will take the first incoming FlowFile it sees and add it to bin 1. It will then continue to attempt to add additional FlowFiles to Bin 1 until either 1000 total FlowFiles have been added or the min size has reached 1 MB. Now lets say bin 1 has grown to 1000KB (just shy of 1 MB) and the next FlowFile would cause that bin to exceed the max group size of 1 MB. In this case that File would not be allowed to go into bin 1 and would be the first file to start bin 2. Now bin 1 hangs around because the min requirement of 1 MB has not been met and neither max entries or max group size has been met either. So you can see it is possible to fill all 5 of your bins without meeting your very tightly configured thresholds. So what happens when a next FlowFile will not fit in any of the 5 existing bins? The mergeContent processor will merge to oldest bin to free room to start a new bin. So what I am assuming here is you are seeing few or no files that are exactly 1 MB. Thanks, Matt
... View more
01-09-2017
10:10 PM
@Rohit Ravishankar
If you found this information helpful, please accept the answer.
... View more
01-09-2017
10:08 PM
@Rohit Ravishankar Let assume you want to merge the text based Content of both your ABC.txt and CTRL_ABC.txt files into one single NiFi FlowFile. The resulting content of that new merge FlowFile should consist of the content of CTRL_ABC.txt before ABC.txt. A simple combination of ListFile (need 2 of these) --> UpdateAtttribute (need 2 of these) --> FetchFile --> MergeContent will do the trick.
The flow would look something like this: A template is below that can be uploaded to your NiFi which will show how to configure each of these processors so that they are merged in the proper order and merged with the appropriate CTRL files. merge-two-files-using-defragmentation.xml Hope this helps, Matt
... View more
01-09-2017
02:25 PM
1 Kudo
@Rohit Ravishankar
How do you plan to combine the "content" of these two files together? This is the first question that needs to be addressed. You can use the mergeContent processor to merge the "content" of multiple FlowFiles using binary concatenation. If this is acceptable, then all you need to do is consume both your datafile and control file, use updateAttribute to extract the a common name from both filenames into new attribute, and finally use that new attribute as the "correlation Attribute Name" in the MergeContent processor. You would also want to set the min number of entries to 2 in the mergeContent processor. Matt
... View more
01-09-2017
02:15 PM
2 Kudos
@Joshua Adeleke Also check your NiFi app log for any Out Of Memory Errors (OOME). The SplitText processor may be having memory issues trying to split over 40k records. You could try using two splitText processors in series with the first splitting on a 10,000 "Line Split Count" and the second then splitting those 10,000 line FlowFiles with a 1 "Line Split Count". This will greatly reduce the heap memory footprint. In addition, if you do a listing on the queue feeding your putSQL processor, do you see any listed FlowFiles with an unexpected size? Matt
... View more
01-09-2017
01:44 PM
2 Kudos
@Narasimma varman Is your NiFi a single instance of NiFi or a NiFi cluster? If it is a cluster, keep in my mind by default the GetFile processor will be running on every node in that cluster. The validate will also run on every node as well, so make sure the directory exists on all nodes. Also make sure you have only specified a d directory path in the "Input Directory" property in GetFile.
In you case, you should have only "/root/example" for that property. The filename you wish to pickup should be specified in the "File Filter" property. Matt
... View more
01-06-2017
05:44 PM
@mel mendoza
By default NiFi logs processor level events to the nifi-app.log. The default overall nifi-app.log log level in the latest releases is set to WARN. This means that only WARN and ERROR log level events are written to the logs. The logs that report successful data delivery would be INFO level events, so you would need to adjust the NiFi logging to get the output you are looking for. Just setting the default logging level to INFO for the nifi-app.log may make things way to noisy in teh log. NiFi's logging is configured in the logback.xml file. You will see in the logback.xml that NiFi has three default appenders for nifi-app.log, nifi-bootstrap.log and the nifi-user.log. While you cannot configure logging down to a specific processor, you can configure logging against a specific processor class. So it is possible to create a new appender (Would create a new log if desired) and then create additional loggers for the specific processor classes you want INFO level enabled for. If you feel i have addressed your original question, please accept my answer. Matt
... View more
01-05-2017
01:23 PM
@mel mendoza NiFi supports many different protocols that can be used for data ingestion. Many of those are fault tolerant but some like UDP are not.
For the fault tolerant protocols, NiFi is built in such a way to ensure ingestion of the data at least once.
NiFi does this in three phases: 1. Receives data over fault tolerant protocol 2. Commits Session to NiFi. 3. Depending on processor either deletes/acknowledges success to the data source or saves state about the data that was ingested. With this model comes the small possibility that some NiFi fault or server failure between phase 2 and 3 could result in phase 3 not happening. In that case, upon recovery, that particular data may be ingested a second time. Thanks, Matt
... View more
01-04-2017
07:55 PM
1 Kudo
@Timothy Spann Once you run out of heap space, NiFi is going to start throwing all kinds of WARN and ERROR log entries.
Looks like you need to increase your configured heap memory settings in the bootstrap.conf file.
... View more