Data Engineering: Spark and Airflow as a managed service

How Cloudera Data Engineering on premises runs Spark 3.5 jobs and Airflow schedules on Kubernetes: the service and Virtual Cluster model, quotas, Spark Connect sessions, Iceberg tables on Ozone, connectors to Kafka and HBase, observability, security, and what to decide.

Updated CompTech Team

Every bank and ministry that runs a Cloudera cluster has a folder of Spark jobs somewhere. They were written over years by different people, they run on YARN at night, and the only thing that schedules them is a cron table on an edge node that one engineer understands. When one fails the next one runs anyway, and when the regulator asks which version of Spark produced a report, nobody is sure. The platform works, but the operating model around it does not scale past a handful of teams.

Cloudera Data Engineering is Cloudera's answer to that operating model. It takes the same Spark and adds what was missing: an isolated, quota-controlled cluster per team, a job catalogue with its own history, Apache Airflow for scheduling and dependencies, a command-line tool and REST API for automation, and interactive sessions that an IDE can connect to. It runs as a containerised service on OpenShift or on Cloudera Embedded Container Service, not on the YARN cluster, and it reads and writes the same storage, metastore and security policies as everything else on the platform.

This article explains how it differs from Spark on YARN, the anatomy of a service and its Virtual Clusters, how a job runs, the versions as of October 2026, Spark Connect sessions, Iceberg tables and the Base cluster connectors, monitoring and security, and the decisions to make before the first Virtual Cluster is created.

Spark on YARN or Spark as a service

A Cloudera Base on premises cluster already runs Spark on YARN, beside Hive, HBase and Kafka, and it is a perfectly good engine. The limits are not in Spark but in everything around it.

Spark on YARN in the Base cluster Cloudera Data Engineering
Where it runs On the Base cluster's workers, beside every other service In its own Kubernetes namespaces on OpenShift or ECS
Isolation YARN queues on shared nodes, one Spark version A Virtual Cluster per team, each with a quota and its own Spark version
Scheduling Cron, Oozie or an external scheduler Apache Airflow embedded in every Virtual Cluster
Job history The Spark History Server, per application A job catalogue with runs, logs, retries, schedules and the code that ran
Automation spark-submit scripts over SSH The CDE CLI and a REST API, with Git repositories as the source of code
Interactive use A notebook on an edge node Sessions in the browser or CLI, and Spark Connect from any IDE
Upgrades Spark moves when the Runtime moves Spark is chosen per Virtual Cluster; the Base cluster can stay put

Spark on YARN still makes sense for a cluster with no Data Services layer and no plan for one, and for a workload bound to YARN for a reason, such as a Hive-on-Tez pipeline with Spark stages in it. Anything new is easier to build and run in Cloudera Data Engineering, because it gives each team a place of its own without a cluster of its own.

It is also the sanctioned way to get a newer Spark on an older Base cluster. The Spark 3.3 add-on for Base 7.1.9, called CDS 3.3, is deprecated with end of support in August 2026, and Cloudera's guidance is to move to Spark 3.5. Runtime 7.3.1 and 7.3.2 ship Spark 3.5 and nothing older. A Virtual Cluster is created with a Spark version, so a team can be on Spark 3.5 while the Base cluster is still on 7.1.9.

The anatomy of a service

Cloudera Data Engineering is enabled per environment. An environment, in Cloudera's vocabulary, is a Base cluster registered with the Management Console, which brings its storage, Hive Metastore, Kerberos realm, Ranger and Atlas with it. The Base cluster must have Apache Ozone enabled before the environment is created, because that is where the service keeps its logs and job artefacts and where most of the data the jobs work on lives.

The anatomy of Cloudera Data Engineering on premises. At the top, the Cloudera Management Console holds an environment registered to a Cloudera Base on premises cluster. Inside OpenShift or Cloudera Embedded Container Service, one Data Engineering service contains two Virtual Clusters side by side: a Core cluster for the finance team on Spark 3.5 with a guaranteed and a maximum quota, and an All Purpose cluster for analytics that also runs sessions and Spark Connect. Each has its own embedded Airflow, job catalogue and Spark History Server, and runs jobs as a driver pod plus executor pods. Mint arrows go down to the Base cluster, where Apache Ozone holds the Iceberg tables and the Hive Metastore, Ranger, Atlas and Kerberos provide the catalog, policies and identity. Orange arrows carry logs and history back up.
  • The service. One service per environment is the usual pattern. It holds the shared parts: the API server, user and artefact access management, telemetry settings, Git repository definitions and the connectors to Base cluster components. On ECS a service can be pinned to dedicated nodes chosen in Cloudera Manager, and since 1.5.5 SP3 those nodes get their taints and labels automatically.
  • Virtual Clusters. A Virtual Cluster is an autoscaling Spark cluster with a name, one Spark version and an elastic quota: a guaranteed amount of CPU and memory that is always available to it, and a maximum it may borrow up to when the platform has spare capacity. The documented minimum is 12 cores and 32 GiB. The Core tier runs batch jobs, Airflow and monitoring; All Purpose adds interactive sessions and streaming workloads. Each Virtual Cluster gets its own Kubernetes namespace, embedded Airflow, Spark History Server and endpoint URL, and takes about twenty minutes to create. Different Virtual Clusters in one service can run different Spark 3 versions, but each runs exactly one.
  • Jobs. A job is a definition: an application file (a PySpark script, a Scala or Java JAR, or an Airflow DAG), its arguments and Spark configuration, the resources it needs, and optionally a schedule. Each run keeps its own logs, metrics and status, and deleting a job keeps its run history.
  • Resources. File resources, Python environments built from a requirements.txt (with a credential for a private package index if needed), Airflow Python environments for DAG dependencies, and custom Spark runtime images for teams that need their own libraries baked in. Python environments are immutable; to change a dependency you build a new one and repoint the job.
  • Repositories. Job code can come from GitHub, GitLab or Bitbucket, which gives pipelines code review and a release history instead of scripts uploaded by hand.
  • Sessions. On an All Purpose Virtual Cluster, a short-lived interactive Spark environment reached from the browser or from the CLI on a laptop. Spark Connect sessions, covered below, extend this to IDEs.
  • The CLI and API. Everything the user interface does, the cde tool and the Jobs REST API can do. This is the layer CI pipelines and an external Airflow call.

Since 1.5.5 the recommended Spark image is a security-hardened, distroless one that carries only what Spark needs; the Red Hat Universal Base Image builds remain for compatibility. Test jobs on the hardened image in a non-production Virtual Cluster first, because packages teams quietly relied on may not be there.

How a job runs

When a run starts, the service creates a Spark driver pod in the Virtual Cluster's namespace, and the driver asks Kubernetes for executor pods. Dynamic allocation sets the count and the quota caps it: a job can grow from the guaranteed quota into the maximum when the platform has free capacity, and shrinks back when a neighbour needs its guarantee. Shuffle data normally lives on the executors' local disks; a Virtual Cluster can put it on persistent volumes for shuffles that would not fit.

The pods read and write the Base cluster's storage: Ozone by default, over its S3-compatible gateway or its Hadoop-compatible file system interface, plus HDFS and Hive tables. Identity comes from Kerberos: each user registers a keytab, or a principal and password, and the job runs as that user, so Ranger policies apply exactly as they would for a query in Hive. The Spark History Server keeps the event logs, and driver and executor logs are available from the run's page, the CLI and the API.

GPU acceleration exists but is a Technical Preview. A Virtual Cluster can be given a GPU quota, and a Spark 3 job or session can be marked GPU-accelerated without changing its code; the SQL plan in the History Server then shows which operators ran on the GPU. Since SP2 the feature is disabled by default and needs Cloudera Support to switch on, and GPUs are shared with Cloudera AI, so this is something to trial, not plan around. Our RAPIDS series explains what the underlying cuDF plugin for Apache Spark does and does not accelerate.

Spark versions and service packs

Release What changed for Data Engineering
1.5.5 Security-hardened Spark images; Red Hat Universal Base Image builds deprecated
SP1 Guidance for moving Virtual Clusters to Spark 3.5 when the Base cluster moves to 7.3.1; Airflow 2.11.0; artefact sharing; Airflow connections for Data Warehouse, Base Hive and Impala, and Sqoop
SP2, January 2026 Spark 2.4.7 and 3.2.3 removed; monitoring with Cloudera Observability; dedicated ECS nodes; access management and privacy settings on OpenShift; third-party certificate managers
SP3, June 2026 Spark Connect sessions generally available with Java and Scala clients; connectors to Kafka, HBase, Phoenix and Ozone; shared S3-compatible credentials; Airflow connections and variables restricted to administrators; Google and Snowflake Airflow providers removed
SP4, September 2026 In-place upgrades with stable endpoints; Data Recovery Service backup and restore; re-running individual failed Airflow tasks; Spark event logs exported through an OpenTelemetry gateway; automatic job run retention (Technical Preview); Kubernetes 1.34, Python 3.11, Java 17

Four service packs in a year is why the in-place upgrade in SP4 matters: before it, an upgrade could change a Virtual Cluster's URL, and every client and pipeline that pointed at it had to be updated.

Spark Connect: the cluster from an IDE

Spark Connect, part of Apache Spark since 3.4, replaces copying scripts to an edge node with a client-server protocol: the DataFrame API runs in the IDE, the plan goes to a Spark server, and only results come back. Cloudera Data Engineering exposes it as a session type.

A Spark Connect session is created on an All Purpose Virtual Cluster with a lowercase name, and the developer connects from PySpark, Scala or, since SP3, Java, using Cloudera's client library, which handles authentication and TLS. The session has a driver of its own and its executors scale with dynamic allocation. Since SP3 a session can stay alive for up to 90 days instead of eight hours, which suits the notebooks analysts leave open, and SparkSession.addArtifact accepts files up to 200 MB, up from 50 MB.

The constraints are the ones Spark Connect carries everywhere plus a few of Cloudera's. The DataFrame, Column, functions and most of the Streaming API work; SparkContext and the RDD API do not. Only the user who created a session can use it, administrators included, which prevents one person running SQL as another and means two developers cannot share one. The documented prerequisites are Spark 3.5 and Runtime 7.1.9 or later, with Hive tables in Parquet or ORC and Ranger table-level policies. For a team on VS Code or IntelliJ, this is the feature that changes daily work most, because development and production use the same tables and policies.

Airflow on every Virtual Cluster

Each Virtual Cluster runs an embedded Apache Airflow 2.11. A pipeline is a Python DAG uploaded as an Airflow job, and the DAG orchestrates other jobs rather than doing the work itself.

  • CDERunJobOperator runs a Cloudera Data Engineering job, in the same Virtual Cluster or another one through a connection. This is what strings Spark jobs into a pipeline with dependencies, retries and schedules.
  • SQLExecuteQueryOperator runs SQL against a Data Warehouse Virtual Warehouse or against Hive and Impala on the Base cluster. The older CDWOperator, CDWHook and CDWSensor are deprecated and removed, so DAGs that used them must change.
  • Standard operators and sensors work for everything else. The Google and Snowflake provider packages were removed in SP3 for security reasons.

Cloudera adds rules on top. Connections, variables and XCom are managed by administrators, not by every DAG author, which closes the common hole of credentials pasted into variables. The native Airflow REST API is unsupported because it would bypass run tracking. Clearing a failed task, the Airflow way of re-running part of a pipeline, arrived in the interface with SP4. Airflow's task logs sit on a Kubernetes volume rather than in object storage, so they do not expire on their own and someone has to watch the disk.

An organisation that already runs its own Airflow can keep it: the Cloudera provider package gives any Airflow 2 deployment the same job-run operator, pointed at a Virtual Cluster's Jobs API, so company-wide orchestration stays central and Spark execution moves here.

Iceberg tables and the connectors

Apache Iceberg is the table format the whole platform is converging on, and Spark writes most Iceberg tables. Every Spark 3 Virtual Cluster supports it: a Spark SQL job needs no extra libraries because the Iceberg runtime is on the classpath, while a job that calls the Iceberg API directly builds against the Iceberg dependencies. Two Ranger policies are needed on the Base cluster first, an edit to the default Hadoop SQL storage handler policy so Spark can reach the table files, and a policy granting SQL access to the tables. From there a job creates tables, migrates existing external Hive tables in place, and updates rows with copy-on-write or merge-on-read according to the workload. The Iceberg lakehouse article covers the format, the catalog and the Lakehouse Optimizer that keeps tables compact.

One pipeline end to end on Cloudera. On the left, a core banking database and application logs are the sources. Apache NiFi on the Base cluster and Apache Kafka carry the records into a landing bucket on Apache Ozone. In the middle, a Cloudera Data Engineering Virtual Cluster is the main box: an Airflow DAG scheduled nightly runs a Spark 3.5 job that cleans the data, joins it to reference tables and writes an Iceberg table back to Ozone. On the right, a Cloudera Data Warehouse Virtual Warehouse running Impala queries the same Iceberg table, and dashboards in Data Visualization show the result to business users. Dashed orange lines from the Shared Data Experience on the Base cluster show the Hive Metastore, Ranger, Atlas and Kerberos supplying the same catalog, policies, lineage and identity to both the Spark job and the warehouse.

The connectors introduced in SP3 and completed in SP4 close the loop with the rest of the Base cluster. An administrator registers a connector to Kafka, HBase, Phoenix or Ozone once, and from then on Spark jobs in that service get the client libraries and configuration loaded automatically: a streaming job consumes Kafka topics, a batch job writes scored records to an HBase table, a pipeline queries the Operational Database through Phoenix SQL. Before SP3 each team carried those JARs and configuration files in its own resources, which is exactly the drift the service exists to remove. Shared S3-compatible credentials, also from SP3, do the same for object storage outside Ozone, such as a NetApp StorageGRID or Dell ObjectScale bucket.

Monitoring and observability

Three layers of monitoring answer three questions. Spark itself, with the live Spark UI, the History Server and the pod logs, answers "why did this job fail?". The Grafana dashboards shipped with the service, with Kubernetes and Virtual Cluster metrics such as CPU and memory against quota, answer "is the finance Virtual Cluster starved?".

The third is Cloudera Observability, a separate product at version 3.7.1 on premises as of October 2026. A service with Observability Analytics enabled in its telemetry settings sends every Spark run's metrics, and Observability keeps the history, shows trends per job, and produces prescriptive resource recommendations: the executor counts and memory sizes a job should have asked for, derived from what it used. It also brings budgeting, so a department's use of the platform can be tracked against an allocation. This answers "which jobs waste the cluster, and who pays?". SP4 adds a route for organisations with their own tooling: finalised Spark event logs can be exported through an OpenTelemetry gateway. The Observability and DR article covers the product.

Security

Everything inherits from the environment. Users sign in through the Management Console, which fronts the organisation's LDAP or Active Directory, and roles decide who can create Virtual Clusters, run jobs, and see what. A job, session, repository or resource can be shared with named users or groups, and a Virtual Cluster can restrict sharing by default.

Data access is Kerberos and Ranger, exactly as on the Base cluster. A job runs as the principal of the user who owns it, so a policy that masks the account number column masks it in Spark as well as in Hive, and Atlas records lineage from jobs to the tables they wrote. Credentials for external systems are stored in the service and referenced by name, never written into job code. Endpoint certificates are self-signed by default and can be replaced with the organisation's own.

What to decide

One Virtual Cluster per team or per workload. A Virtual Cluster is the unit of isolation, quota, Spark version and Airflow. The usual starting layout is one Core Virtual Cluster per team for production work, with the guaranteed quota set to what the nightly load needs, and one shared All Purpose Virtual Cluster for development and sessions. Keep the two apart; a runaway notebook can eat the quota the nightly jobs rely on.

Quotas and the platform underneath. Guaranteed quotas across all Virtual Clusters must fit the OpenShift or ECS nodes with room for the control plane and the other data services. Maximum quotas can oversubscribe the platform, because they are only reachable when others are idle. The 12-core, 32 GiB minimum per Virtual Cluster adds up quickly on a small platform.

Where the data lives. Ozone is required and is the right default for new tables. Keep HDFS for what already lives there and read it from Spark; the Ozone object store article explains the migration. For data that must stay in the country, this layout keeps every byte on the Base cluster in the data centre, with the Data Services layer holding only logs and artefacts.

Python dependencies. Decide early whether teams build their own Python environments from requirements.txt or the platform team publishes a few blessed ones. Because environments are immutable and the hardened image is minimal, the second approach is less work and easier to audit, and a private package mirror is a prerequisite for an air-gapped site either way.

Scheduling. With an enterprise Airflow already in place, use the provider package and keep orchestration central. Without one, the embedded Airflow per Virtual Cluster is enough. Plan Airflow log housekeeping from day one.

Versions. Match the service pack to the Base cluster, and treat the Data Services release as one unit: Cloudera AI on the same platform needs SP2 CHF1 or later with Runtime 7.3.2, so move every service together.

Further reading

In this series