Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

NiFi Large FlowFile Attributes

avatar
Expert Contributor

I understand NiFi stores its FlowFile attributes in memory and large attributes are not recommended because it takes up space in the JVM. What I am having trouble grasping is the consequences. Can someone explain different use cases what could happen and also, how long those attributes are stored in memory for?

1 ACCEPTED SOLUTION

avatar
Expert Contributor

Every flowfile is held in memory for as long as the flowfile is in the flow, until it reaches a DROP event[1]. This means, that if you're writing a large attribute (such as a json) this will eventually add up to a large heap usage.

Keep in mind that the attributes also get stored in data provenance so there's also an impact there.

 

Biggest consequence to this a risk of NiFi going OOM, then failing to load the flowfile repository on startup.

If the flowfile repo is too large it can also take longer for NiFi to start up, or also go OOM on startup while trying to load the repositories.

 

This is also touched on the Anti-patterns video[2]


[1]https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#provenance_events
[2]https://www.youtube.com/watch?v=RjWstt7nRVY

View solution in original post

1 REPLY 1

avatar
Expert Contributor

Every flowfile is held in memory for as long as the flowfile is in the flow, until it reaches a DROP event[1]. This means, that if you're writing a large attribute (such as a json) this will eventually add up to a large heap usage.

Keep in mind that the attributes also get stored in data provenance so there's also an impact there.

 

Biggest consequence to this a risk of NiFi going OOM, then failing to load the flowfile repository on startup.

If the flowfile repo is too large it can also take longer for NiFi to start up, or also go OOM on startup while trying to load the repositories.

 

This is also touched on the Anti-patterns video[2]


[1]https://nifi.apache.org/docs/nifi-docs/html/user-guide.html#provenance_events
[2]https://www.youtube.com/watch?v=RjWstt7nRVY