Data Flow: NiFi flows and edge agents for getting data in
How Apache NiFi moves files, database changes and API payloads into a Cloudera platform with provenance, what changed in NiFi 2, how Cloudera Flow Management 4.12 ships it on Base 7.3.2, and how Edge Management runs MiNiFi agents at branches and on devices.
Every data platform has a front door, and it is rarely tidy. A core banking system drops fixed-width files on an SFTP server at 2 a.m. A card switch writes to an Oracle database that nobody may query during the day. A mobile app posts JSON to an API. Branch servers in forty districts generate logs on links that drop for an hour at a time. Before any of that can land in a lakehouse table, somebody has to collect it, check it, route it, retry it and prove where it came from. On a Cloudera platform that job belongs to Apache NiFi, which Cloudera packages as Cloudera Flow Management, and to its small sibling at the edge, MiNiFi, which Cloudera manages through Cloudera Edge Management.
NiFi is often mistaken for an ETL tool or a stream processor. It is neither. It is a data logistics system: it moves data between systems reliably, transforms it lightly along the way, and keeps a record of every hop. Heavy transformation belongs in Spark, covered in Data Engineering, and continuous computation in Flink, covered in Streaming. This article explains the NiFi model, what changed in NiFi 2, how Cloudera ships it on premises as of October 2026, how edge agents fit, the ingestion patterns that come up on nearly every project, and the decisions an architect has to make.
What NiFi is for
NiFi came out of the US National Security Agency in 2014 as a tool for moving data between systems with a complete audit trail. Its design goals have not changed: guaranteed delivery, back pressure when a destination slows down, provenance for every piece of data, and a visual interface where a flow can be built, watched and changed while it runs. What you draw is what runs.
Three things make it the right tool for ingestion. It speaks almost every protocol an enterprise uses: SFTP, SMB, HTTP, JDBC, Kafka, MQTT, S3-compatible object storage, HDFS, HBase, Iceberg and a few hundred more, each as a ready-made processor. It treats each piece of data as an object with its own history, so when a regulator asks where a record came from, the answer is a query rather than an investigation. And it fails gracefully: when the lakehouse is down, data queues in NiFi's repositories and drains when the lakehouse returns.
What NiFi is not for is equally important. It processes one FlowFile at a time, or a batch of records inside one FlowFile, on one node. A join between two tables with a hundred million rows each is a Spark job. A windowed aggregation over a stream is a Flink job. A flow that tries to do either in NiFi works in the demonstration and fails in production.
The NiFi model
A FlowFile is the unit of data in NiFi. It has two parts: a small map of attributes, such as the filename, the source path, a timestamp and anything a processor adds, and the content, which is the bytes themselves. Attributes travel in memory and content stays on disk, so a flow can route a two-gigabyte file on its filename without reading it.
A processor does one thing to a FlowFile: fetch it, convert it, split it, enrich it, route it, or send it somewhere. Processors have properties, a schedule, and named relationships such as success, failure and retry that the designer wires to the next step. Record-oriented processors, which use reader and writer controller services to understand CSV, JSON, Avro or Parquet, let one processor validate thousands of records inside one FlowFile without splitting it into thousands of FlowFiles, which is the single most important performance habit in NiFi.
A connection joins two processors and holds a queue with a back-pressure threshold in object count and in bytes. When a downstream processor cannot keep up, the queue fills, the upstream processor stops being scheduled, and the slowdown propagates back to the source. Connections also have prioritisers, so the oldest, newest or highest-priority FlowFile goes first, and an expiry, so data too old to matter is dropped.
A process group is a flow inside a box, with input and output ports. It is how large flows are organised, how teams own parts of a shared canvas, and the unit of versioning in NiFi Registry. Controller services are shared components that processors reference rather than configure individually: a database connection pool, a Kerberos credential, a record schema, an SSL context, a Kafka connection. Parameter contexts hold the values that differ between environments, such as hostnames, paths and secrets, so the same flow definition can run in development, test and production with a different context attached.
Underneath the canvas sit three repositories on the NiFi node's local disks. The FlowFile repository is a write-ahead log of every FlowFile's attributes and position in the flow, so a node restart resumes where it stopped. The content repository holds the bytes, with copy-on-write so that a processor that modifies content creates a new claim rather than overwriting. The provenance repository records every event, receive, route, modify, send and drop, with the attributes before and after, so any record in the lakehouse can be traced back to the file, the host and the minute it arrived. These repositories want separate fast disks; sharing them with the operating system is the most common sizing mistake.
What changed in NiFi 2
Apache NiFi 2.0 was released in late 2024 after a long 1.x line, and Cloudera's on-premises packaging moved to it with Base 7.3.2. The release removed features that had accumulated over ten years and added two that matter for new work.
| Area | NiFi 1.x | NiFi 2 |
|---|---|---|
| Java | Java 8 then 11 | Java 21 minimum; Cloudera recommends Azul Zulu OpenJDK |
| Environment-specific values | Variables on process groups, plus parameter contexts | Parameter contexts only; variables are gone |
| Reusable flow pieces | Templates stored inside NiFi | Flow definitions as JSON files, versioned in NiFi Registry or Git |
| Flow storage | flow.xml.gz |
flow.json.gz only |
| Custom logic | Java processors, scripted processors in Groovy, Jython, and others | Java processors and native Python processors; Python 3.11 minimum, 3.12 recommended on Cloudera |
| Stateless execution | A separate stateless runtime | A process group can run in stateless mode on the main runtime, treating each trigger as one transaction |
| Deprecated processors | Hundreds carried along | Removed, with replacements in most cases |
The Python processor API is the headline. A processor is a Python class with a transform method, and NiFi manages its virtual environment and dependencies, so a custom parser or enrichment step costs a script rather than a Java build. The stateless mode matters for exactly-once patterns: a process group that consumes from Kafka, transforms and writes to Iceberg can run so that the whole sequence either completes or rolls back, rather than leaving a FlowFile stranded in a queue between steps.
The removals are what make upgrades a migration. Variables, templates and the XML flow format are not supported in NiFi 2, so a 1.x flow has to be converted rather than upgraded in place, which a later section covers.
How Cloudera ships NiFi on premises
As of October 2026 there is no containerised Data Flow service in Cloudera Data Services on premises. NiFi runs on the Base cluster as a parcel called Cloudera Flow Management, installed and configured by Cloudera Manager alongside the other Runtime services. The current line is Cloudera Flow Management 4.12.0, which bundles Apache NiFi 2.6.0 and NiFi Registry 2.6.0 and is supported only on Cloudera Base on premises 7.3.2. Service packs 4.12.0.10001 and 4.12.0.20000 carry fixes rather than new features.
What the Cloudera packaging adds over the Apache release:
- Cloudera Manager deploys NiFi and NiFi Registry as services, manages their configuration, certificates and restarts, collects logs and metrics, and runs upgrades.
- Security integration: Kerberos for the service principals, TLS for every port, Apache Ranger for authorisation of the NiFi interface and of Registry buckets, and Apache Knox for single sign-on. A user who may view one process group and not another is a Ranger policy, not a NiFi configuration file.
- FIPS 140-3 validated cryptography replaced the 140-2 provider in 4.12.0, and Cloudera Manager can put NiFi and NiFi Registry into a TLS 1.3-only mode, which refuses clients that only speak TLS 1.2.
- Platform processors that know the Cloudera services: Kafka connection services with Kerberos and, since 4.12.0, OAuth2 bearer tokens; HDFS and Ozone processors that read the cluster's client configuration; PutIcebergRecord for writing record FlowFiles into Iceberg tables, with Iceberg v3 deletion vectors; HBase and Phoenix processors; an MQTT reader that parses Sparkplug industrial messages; and flow analysis rules that flag a listening HTTP or TCP processor with no TLS context.
A NiFi cluster on Base is a set of nodes coordinated through the cluster's existing ZooKeeper service, which elects a coordinator and a primary node. Every node runs the same flow against its own repositories; source processors that must not run twice, such as a directory listing, are pinned to the primary node, and the listed work is then spread across nodes with load-balanced connections. Cloudera's minimum is four cores per NiFi node, with eight recommended, and in practice the repository disks and the network to the sources decide throughput more than the cores do.
Migrating NiFi 1 flows
Organisations running Cloudera Flow Management 2.x on Base 7.1.x cannot upgrade in place. The route is to bring the old cluster to 2.1.7 SP3, export each flow, run the Cloudera Flow Management Migration Tool 7.0.0, and import the result into 4.12.0. The tool reads a flow.json, applies a published ruleset for NiFi 1.28.1 to 2.6.0, and works in two stages: the first produces a flow that still runs on NiFi 1 and lists the manual changes still needed, the second applies the changes NiFi 2 requires. Variables become parameter contexts, templates become separate flow definition files, and every change is logged with its reason.
It cannot do everything. Custom processors written against the NiFi 1 API are preserved but must be rewritten, because the component APIs are incompatible. Deprecated processors with no algorithmic replacement are flagged for a human, as are name clashes between variables, dynamic properties and FlowFile attributes. Registry migration of versioned flows is a Technical Preview. For a bank with a few hundred flows built up over five years, the migration is a project of weeks, and the time goes into the custom components and the testing, not the tool.
Edge Management
A NiFi cluster lives in a data centre with fast disks and a reliable network. The data often starts somewhere else: a branch server on a wireless link, a kiosk, a vehicle, a sensor gateway on a factory floor, a substation. Cloudera Edge Management extends the flow model to those places with two parts.
MiNiFi is a small agent that runs a NiFi flow without the user interface or the clustering. The C++ agent, currently 1.26.06, is a few tens of megabytes, runs on Linux, Windows and constrained hardware, and supports Python processors; the Java agent, currently 4.12.0.0, shares NiFi's processor library and ships MQTT processors by default. An agent collects locally, buffers on disk when the link is down, and forwards to NiFi over site-to-site or HTTP when it is up, so an hour's outage at a branch becomes an hour's delay rather than an hour's gap.
Edge Flow Manager is the console that designs, deploys and monitors the agents. Agents are grouped into agent classes, such as "branch servers" or "ATMs", and a flow is designed once per class on a canvas that looks like NiFi's. Agents send heartbeats with their status and their manifest of available processors; Edge Flow Manager answers with flow updates, property changes and start and stop commands. That exchange is the command-and-control protocol, C2, and it is what makes a few thousand agents manageable by one team. Edge Flow Manager 2.4.0 added lifecycle control, so a flow can be started or stopped per class or per agent (C++ agent 1.26.02 or later; not yet in the Java agent), a repository for distributing agent binaries, and warnings when an agent's manifest has drifted from its class.
For a Bangladeshi bank the obvious use is branch and ATM telemetry: journal files, device health and transaction logs collected at source and shipped to the core with provenance intact, over links that are not always up. For a utility or a port it is sensor data from gateways that speak MQTT or Modbus. The pattern is the same: collect and buffer at the edge, concentrate in NiFi, publish to Kafka for the real-time consumers and to Ozone for the historical record.
Patterns that recur
Most ingestion requirements fall into a handful of shapes, and each has a known NiFi design.
Files from a landing zone. ListSFTP on the primary node lists the directory, the listing is load-balanced across the cluster, FetchSFTP on every node pulls the files, a record reader validates them against a schema, and good records go to Ozone or an Iceberg table while bad ones go to a quarantine bucket with the error as an attribute. The listing keeps state so a file is fetched once, and the source file is moved only after the write succeeds.
Database changes. QueryDatabaseTable and GenerateTableFetch poll a table on a watermark column, which suits tables with a reliable updated-at timestamp and tolerates minutes of delay. For true change data capture, where every insert, update and delete must be seen in order, the better design on a Cloudera platform is Debezium in Kafka Connect on the Base cluster, which the Kafka series covers; NiFi then consumes the change topics and applies them to Iceberg or HBase. NiFi's own CaptureChangeMySQL covers one database engine and is not the general answer.
APIs and webhooks. InvokeHTTP polls a REST API on a schedule with paging and token refresh; ListenHTTP receives webhooks, with TLS. Payloads are usually JSON, which the record processors convert to Avro with a schema from Schema Registry before publishing to Kafka, so consumers get typed data rather than strings.
Fan-out to the platform. The same validated FlowFile often goes to three places: PublishKafkaRecord for the streaming consumers, PutIcebergRecord for the lakehouse, and PutHBaseRecord for a serving table that an application reads by key. That is three arrows on the canvas, and provenance records all three sends.
The flow development lifecycle
Flows are code and deserve the same discipline. NiFi Registry versions process groups: a developer commits a process group to a Registry bucket with a comment, and another NiFi instance can import that version. Promotion from development to production is importing a specific version into the production NiFi and attaching the production parameter context, not rebuilding the flow by hand. NiFi 2 also supports Git-backed registry clients, including, since Cloudera Flow Management 4.12.0, Azure DevOps, so flow definitions can live beside application code and go through the same pull-request review.
Cloudera publishes ReadyFlows, prebuilt flow definitions for common sources and sinks. In the public cloud they are a catalogue inside the DataFlow service; on premises they are flow definition files to import, and they are worth treating as reference designs even when a flow has to be customised.
A workable lifecycle on premises: developers build on a small NiFi with test parameter contexts and commit to Registry; a test NiFi imports tagged versions; production imports only versions that passed test, with Ranger limiting who may change a running flow and provenance showing who changed what. Secrets never go into the flow; they go into sensitive parameters or a controller service backed by an external vault.
What to decide
An architect planning NiFi on a Cloudera platform in Bangladesh faces a short list of decisions, and most of them concern the edges of the system rather than the canvas.
| Decision | What drives it |
|---|---|
| NiFi node count and disks | Megabytes per second and FlowFiles per second. Start with three nodes for availability, eight cores each, with the three repositories on separate SSDs. Grow nodes before growing node size. |
| Where NiFi runs | On the Base cluster as a parcel, the only supported on-premises packaging in October 2026. Plan the hosts as part of the Base cluster design, with Kerberos, Ranger and Knox from the start. |
| NiFi 1 migration | If a Cloudera Flow Management 2.x estate exists, budget the migration as a project and inventory custom processors first, since they must be rewritten. |
| CDC strategy | Debezium in Kafka Connect for ordered change streams; NiFi polling where minutes of delay are acceptable and no log access is possible. |
| Edge agents | If links are unreliable or data volumes are large relative to the link, collect at source; MiNiFi buffering is cheaper than lost data. The C++ agent for small or Windows hosts, the Java agent for processor breadth. |
| Flow governance | Registry from day one, Git-backed if possible, parameter contexts per environment, Ranger policies per team's process groups, provenance retention sized for the regulator's look-back period. |
| Data residency | Everything here runs inside the data centre, including Edge Flow Manager, which matters where data must not leave the country. Air-gapped sites can run agents that forward to a NiFi inside the enclave. |
Two cautions. NiFi's visual canvas makes it easy to build a flow that nobody can explain a year later, so process-group structure, naming and Registry commits matter more than in code, not less. And NiFi's breadth tempts teams to do transformation in it; the moment a flow contains a join or an aggregation over more than one FlowFile, hand that step to Spark through the Data Engineering service and keep NiFi to moving data.
We have not deployed Cloudera Flow Management in our own lab; the versions and behaviours here come from Cloudera's October 2026 documentation and from Apache NiFi, and the design patterns from the ingestion work our data pipeline series describes.
Further reading
- What's new in Cloudera Flow Management 4.12.0
- Cloudera Flow Management 4.12.0 system requirements
- Cloudera Flow Management component versions
- Cloudera Flow Management Migration Tool overview
- Cloudera Flow Management Migration Tool release notes
- What's new in Edge Flow Manager 2.4.0
- Cloudera Edge Management component compatibility
- Apache NiFi documentation
In this series
- Previous: Data Warehouse
- Next: Streaming
- Related: Ozone object store, Iceberg lakehouse, SDX and governance
- Other series: Kafka, Data pipeline overview, and the streaming service page