Integration / Apache NiFi Interview Questions
What is State Management in NiFi and what types of state scope exist?
State Management is NiFi's built-in mechanism for processors and controller services to persistently store small amounts of key-value data that survive processor restarts and NiFi restarts. Without state management, a processor like QueryDatabaseTable would forget the last ingested timestamp every time it was stopped, causing duplicate ingestion.
State has two scopes:
Local State: Scoped to a specific processor on a specific NiFi node. Stored on local disk using LevelDB by default. Used when each node needs its own independent tracking — for example, a GetFile processor tracking which files it has processed from a local directory on that node.
Cluster State: Scoped to a specific processor but shared across all nodes in a NiFi cluster. Stored in ZooKeeper. Used when only one node should track state for the cluster — for example, QueryDatabaseTable running on the Primary Node needs its last-value state visible to whichever node becomes Primary after a failover.
State is accessed programmatically via the StateManager API. From the NiFi UI, you can view and clear a processor's state by right-clicking the processor → View State.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
