Member since
07-30-2019
3436
Posts
1633
Kudos Received
1012
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 159 | 01-27-2026 12:46 PM | |
| 575 | 01-13-2026 11:14 AM | |
| 1276 | 01-09-2026 06:58 AM | |
| 1040 | 12-17-2025 05:55 AM | |
| 506 | 12-17-2025 05:34 AM |
12-27-2019
07:09 AM
1 Kudo
@saivenkatg55 A very common reason for UI slowness is JVM Garbage Collection (GC). All GC events are stop-the-world events whether it is a partial or full GC event. Partial/young GC is normal and healthy, but if it is being triggered back to back non stop or is running against a very large configured JVM heap it can take time to complete. You can enable some GC logging in your NiFi bootstrap.conf file so you can see how often GC is running to attempt to free space in your NiFi JVM. To do this you need to add some additional java,arg.<unique num>= entries in your NiFi bootstrap.conf as follows: java.arg.20=-XX:+PrintGCDetails
java.arg.21=-XX:+PrintGCTimeStamps
java.arg.22=-XX:+PrintGCDateStamps
java.arg.23=-Xloggc:<file> The last entry allows you to specific a separate log file for this output to be written in to rather than stdout. NiFi does store information about component status in heap memory. This is the info you can see on any component (processor, connection, process group, etc.) when you right click on it and select "view status history" from the displayed context menu. You'll notice that these component report status for a number of data points. When your restart your NiFi, everything in the JVM heap memory is gone. So over the next 24 hours (default data point retention) the JVM heap will be holding a full set of status points again. You can adjust the component status history buffer size and datapoint frequency to reduce heap usage here if this status history is not that important to you via the following properties in the nifi.properties file: nifi.components.status.repository.buffer.size=1440
nifi.components.status.snapshot.frequency=1 min above represents defaults. For every status history point for every single component, NiFi will retain 1440 status points (recording 1 point every 1 min). This totals 24 hours worth of status history for every status point. Changing the buffer to 288 and frequency to 5 minutes will reduce number of points retained by 80% while still giving your 24 hours worth of points. The dataflows you build may result in high heap usage triggering a lot of heap pressure. Those NiFi components that can result in high heap usage are documented. From the NiFi Global menu in the upper right corner of the NIFi UI, select "Help". You will see the complete list of components on the left had side. When you select a component, details about that component will be displayed. One of the details is "System Resource Considerations". For example, here is the system resource considerations for the MergeContent processor: You may need to make adjustments to your dataflow designs to reduce heap usage. NiFi also holds FlowFile metadata for queued FlowFiles in heap memory. NiFi Does have a configurable swap threshold (which is applied per connection) to help with heap usage here. When a queue grows too large, FlowFile metatdata in excess of the configured swap threshold will be written to disk. The swapping in and swapping out of FlowFiles from disk can affect dataflow performance. NiFi's default backpressure object thresholds settings for connections is set low enough that swapping would typically never occur. However, if you have lots and lots of connections with queued FlowFiles, that heap usage can add up. This article I wrote may help you here: https://community.cloudera.com/t5/Community-Articles/Dissecting-the-NiFi-quot-connection-quot-Heap-usage-and/ta-p/248166 ----- Other than heap usage, component validation can affect NiFi UI responsiveness. Here is an article i wrote about that: https://community.cloudera.com/t5/Community-Articles/HDF-NiFi-Improving-the-performance-of-your-UI/ta-p/248211 Here is another useful article you may want to read: https://community.cloudera.com/t5/Community-Articles/HDF-NIFI-Best-practices-for-setting-up-a-high-performance/ta-p/244999 Hope this helps you with some direction to help improve your NiFi UI responsiveness/performance, Matt
... 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
12-23-2019
09:48 AM
@Boenu You will need to configure your HandleHttpRequest processor with a SSL Context Service in order to encrypt data in transit being sent to this processor from a client. This of course then means you client needs to be able to at a minimum to trust the server certificate presented by this SSL context service in the TLS handshake. The truststore you use in the NiFi SSL Context Service will only need to contain the public cert for your client or complete certificate trust chain for your client if you have configured your HandleHttpRequest processor to "Need authentication" in the Client Authentication property. Mutual Authentication is not needed to ensure encryption of data in transit. Hope this helps, Matt
... View more
12-23-2019
09:40 AM
@Former Member This should not be happening unless you are clearing NiFi state between restarts or NiFi is having a state issue. When the listSFTP processor runs, it will record state so it does not list the same files more than once. If the Files being written to the SFTP server from which you are listing are not using dot rename as they are being written, it is possible your ListSFTP processor is listing them while they are still being written to. Since state is based off timestamps, a file still being written to will have its timestamp updated between executions of the listSFTP processor. This would result in the file being listed again. If the standard ssh dot rename method is not being used, you may need to "minimum File Age" property in listSFTP to make sure only files whose timestamp has not updated for X amount of time are listed. This of course depends on your version of NiFi being used since this property was introduced as part of https://issues.apache.org/jira/browse/NIFI-5977 There is also the possibility if you are using NiFi 1.8 you are hitting this known bug: https://issues.apache.org/jira/browse/NIFI-5849 If you found a solution that worked, please tae a moment to accept the solution to resolve this community question. Thank you, Matt
... View more
12-20-2019
07:29 AM
@saivenkatg55 NiFi musty be secured before you can use any form of authentication and authorization. Along with securing NiFi you can configure NiFi's login-identity-providers.xml to use the "ldap-provider" for user authentication. Here are some useful links: Securing NiFi: https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.4.1.1/nifi-authentication/content/nifi_authentication.html Setting up ldap-provider: https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.4.1.1/nifi-security/content/ldap_login_identity_provider.html Setting up authorization: https://docs.cloudera.com/HDPDocuments/HDF3/HDF-3.4.1.1/nifi-authorization/content/nifi_authorization.html Hope this helps, Matt
... View more
12-18-2019
06:19 AM
HI!! the problem was in CSVReader the decision was to change Schema Access Strategy after this manipulation everything began to work.
... View more
12-17-2019
08:51 PM
Thanks Matt for the quick response.
... View more
12-16-2019
11:48 AM
@JSJ Let's assume you have following directory structure: /nifi/test/AX1/ /nifi/test/AX2/ /nifi/test/XY1/ /nifi/test/XY2/ You would configure your listFile processor as follows: Hope this helps, Matt
... View more
12-15-2019
09:26 PM
Sure thanks. @MattWho. it works!
... View more