Module 5 ended with a warning: outside the exercises, you will meet platforms that have been in production for fifteen years and legacy architectures that nobody is going to rewrite. Many of them are Hadoop clusters. In lesson 03-01 you processed by hand, with a mapper.py and a reducer.py, what today takes a single line of SQL; that very awkwardness is why, between 2008 and 2015, a constellation of tools with animal names grew up around Hadoop.

This lesson is the map of that constellation. You will not install anything: every one of these tools needs a cluster, so the examples are illustrative and are there to help you recognise each piece when you come across it. For each one you will see what it is, what problem it solved, what it looks like with NovaMarket's data and, most importantly at the end of 2026, whether it is still alive. Some have been retired, others survive in maintenance mode, and a few, such as the Hive catalogue, still underpin modern platforms without almost anyone noticing.

The core in ten lines and the map of the ecosystem

Strictly speaking, Hadoop is three pieces you already know:

  • HDFS (lesson 02-01): the distributed file system. 128 MB blocks, a NameNode that holds the metadata, DataNodes that hold the blocks, three replicas of each.
  • YARN (lesson 03-01): the resource manager. It shares out the cluster's memory and cores among the applications that request them.
  • MapReduce (lesson 03-01): the original processing engine. Map, shuffle and reduce, always writing to disk between phases.

Everything else is ecosystem: independent projects, nearly all from the Apache Software Foundation, that rely on that core. They are easier to understand when arranged in layers, the same ones as in lesson 01-04:

flowchart TB
    subgraph Management[Management, security and governance]
        AM[Ambari]
        RA[Ranger]
        AT[Atlas]
    end
    subgraph Ingestion[Ingestion]
        SQ[Sqoop<br/>relational databases]
        FL[Flume<br/>logs and events]
    end
    subgraph Access[Access and processing]
        HI[Hive<br/>SQL]
        PI[Pig<br/>scripts]
        HB[HBase<br/>NoSQL]
        SP[Spark]
    end
    subgraph Engines[Execution engines]
        MR[MapReduce]
        TZ[Tez]
    end
    subgraph Core[Core]
        YA[YARN: resources]
        HD[HDFS: storage]
    end
    subgraph Coord[Coordination and scheduling]
        ZK[ZooKeeper]
        OO[Oozie]
    end
    Ingestion --> HD
    HI --> TZ
    HI --> MR
    PI --> MR
    SP --> YA
    MR --> YA
    TZ --> YA
    YA --> HD
    HB --> HD
    OO -.launches.-> Access
    ZK -.coordinates.-> HB
    ZK -.coordinates.-> Core

One idea makes sense of the whole diagram: almost every tool was born to spare someone from writing MapReduce in Java. Hive spared those who knew SQL; Pig, those who preferred a script; Sqoop and Flume, those who simply wanted to bring data in.

Apache Hive: SQL over files and the catalogue that survived

What it is. Hive, created at Facebook around 2008, is a system that lets you query files stored in HDFS with SQL. Its dialect is called HiveQL. The user writes a SELECT; Hive translates it into a distributed job (originally MapReduce, later Tez), launches it on YARN and returns the result.

What problem it solves. The one from lesson 03-01: to count events by type you had to write two programs. Facebook's analysts knew SQL, not Java. Hive opened the cluster up to them.

Hive has two parts that are worth keeping apart, because they have met different fates:

Part What it does Current status
Query engine (HiveServer2 + Tez) Translates HiveQL and runs it In use on existing clusters; displaced in new projects by Spark SQL and Trino
Hive Metastore A service that stores, in a relational database, which tables exist, with which columns, in which format and in which folder they live Very much alive: Spark, Trino, Flink and several cloud services read it or mimic its interface

External tables

In Hive, a table does not contain data: it is a description applied to a folder. This is the schema-on-read of lesson 02-04. If the table is external, Hive only records where the files are; dropping it removes the description, not the data.

Suppose NovaMarket had been born in 2014 with a Hadoop cluster and its silver zone lived in HDFS. Laura would declare the events like this (illustrative):

CREATE EXTERNAL TABLE novamarket.web_events (
    event_id     STRING,
    customer_id  BIGINT,
    session_id   STRING,
    event_type   STRING,
    product_id   BIGINT,
    event_time   TIMESTAMP,
    device       STRING
)
PARTITIONED BY (date DATE)
STORED AS PARQUET
LOCATION '/novamarket/lake/silver/web_events';

MSCK REPAIR TABLE novamarket.web_events;
  • EXTERNAL and LOCATION tie the table to a folder that already exists. Nothing is copied.
  • The columns are those of the DDL schema you wrote in lesson 03-02. That is no coincidence: Spark inherited its types and syntax from Hive.
  • PARTITIONED BY (date DATE) declares the partition column, which does not appear in the column list because it is not inside the files but in the names of the date=2026-06-15/ folders. This is why the column=value convention you have been using since lesson 02-04 is called "Hive partitioning".
  • MSCK REPAIR TABLE walks through the folder and registers in the Metastore the partitions it finds. Without this step the table exists but appears empty: one of the most frequently repeated mistakes in Hive's history.

And now, Marc's question from lesson 03-01:

SELECT event_type, COUNT(*) AS events
FROM novamarket.web_events
WHERE date = '2026-06-15'
GROUP BY event_type
ORDER BY events DESC;
product_view    4605
search          1008
add_to_cart      748
purchase         281

Four lines instead of two programs. Underneath, the same thing happens as before: the GROUP BY is the shuffle, the COUNT is the reduce, and the filter on date is resolved with partition pruning, reading one folder out of 31.

Why the Metastore survives

When Spark replaced MapReduce, the tables were already declared in the Metastore, and nobody wanted to declare them again. Spark learned to read it; then came Presto and Trino, Impala and Flink. The Metastore became the common technical catalogue (lesson 02-04): the place where any engine asks "where is web_events and what columns does it have?".

That is why services compatible with it turn up on platforms with no trace of Hadoop: AWS Glue Data Catalog offers an equivalent interface, and the modern catalogues for table formats (Unity Catalog, Apache Polaris, Iceberg REST catalogues) are its heirs. As for the engine, the project still publishes releases, which now run on Tez rather than MapReduce, but its role is one of continuity.

Apache HBase: random access on top of HDFS

What it is. A wide-column NoSQL database (lesson 02-03) built on HDFS and inspired by Google's Bigtable.

What problem it solves. HDFS is designed for reading whole files, not for finding a single row. HBase adds what is missing: reading or writing one row by its key in milliseconds, on tables with billions of rows.

Model. Each row has a row key, and rows are stored sorted by it. Columns are grouped into column families and do not need to be declared in advance. There are no joins and no native SQL; the whole design comes down to choosing the key well, just as in Cassandra.

The event history per customer, which was modelled in Cassandra in lesson 02-03, would look like this in the HBase shell (illustrative):

create 'customer_events', 'e'

put 'customer_events', '0000742#2026-06-15T10:15:02', 'e:type', 'purchase'
put 'customer_events', '0000742#2026-06-15T10:15:02', 'e:product', '91'

scan 'customer_events', {ROWPREFIXFILTER => '0000742#', LIMIT => 10}
  • create defines the table and a single column family, e.
  • The key combines the customer, zero-padded on the left so that alphabetical order matches numerical order, and the timestamp. That way, all of a customer's events sit next to each other.
  • scan with a prefix filter retrieves customer 742's events by reading a small, sorted stretch of the table.

When to use it. Reads and writes by key, at large scale, in an organisation that already runs Hadoop. When not to: analysis with aggregations (that is what Hive or Spark are for), small data, or teams with no experience of operating it, because it is demanding.

Status. An active project, in production at large installations. In new projects it competes with Cassandra and with the cloud providers' managed services (Bigtable even offers an HBase-compatible API).

Apache Pig: scripted data flows

What it is. A language, Pig Latin, created at Yahoo to describe transformations step by step, which Pig translates into MapReduce jobs.

What problem it solves. The same as Hive, for a different audience: people who think in terms of "first I load, then I filter, then I group" rather than a declarative query.

events    = LOAD '/novamarket/data/web_events' USING JsonLoader(
              'event_id:chararray, customer_id:long, session_id:chararray,
               event_type:chararray, product_id:long,
               event_time:chararray, device:chararray');
purchases = FILTER events BY event_type == 'purchase';
by_device = GROUP purchases BY device;
counts    = FOREACH by_device GENERATE group AS device, COUNT(purchases) AS purchases;
STORE counts INTO '/novamarket/output/purchases_by_device';

Each line defines a dataset from the previous one, and nothing runs until the STORE. If it looks familiar, that is because it is the same idea as Spark DataFrames: chained transformations and lazy evaluation (lesson 03-02).

Status. Obsolete. DataFrames took its place, with better performance and general-purpose languages. The project has barely any activity and is not recommended for anything new; you will only find it in legacy scripts, which translate into PySpark almost line by line.

Sqoop and Flume: the entry points

Apache Sqoop

What it is. A command-line tool for copying tables between relational databases and HDFS (its name comes from SQL to Hadoop). What problem it solves: batch loading from the shop's database, the full or incremental ingestion of lesson 03-06.

sqoop import \
  --connect jdbc:postgresql://shop-db:5432/novamarket \
  --username lake_load --password-file /user/laura/.db_password \
  --table orders \
  --incremental lastmodified --check-column order_date \
  --last-value "2026-06-14 00:00:00" \
  --target-dir /novamarket/lake/bronze/orders/2026-06-15 \
  --as-parquetfile --num-mappers 4
  • --connect and --table specify the source. The password is read from a protected file and never written in the command.
  • --incremental lastmodified with --check-column and --last-value brings in only the rows modified since the last load.
  • --num-mappers 4 splits the read into four parallel map tasks, each with a range of the primary key. Under the hood, Sqoop is a MapReduce job with no reduce phase.

Status. Retired. In 2021 the Apache Software Foundation moved it to its Attic, the archive of unmaintained projects: it receives no fixes or security patches. Today's alternatives are JDBC reads from Spark, change data capture (CDC) tools such as Debezium, and managed or open-source integration services (Airbyte, Fivetran, each cloud's own offerings).

Apache Flume

What it is. A service for collecting data that is generated continuously, above all log files, and delivering it to HDFS. It is configured with agents, each made up of a source, a channel (the intermediate buffer) and a sink:

agent.sources  = web
agent.channels = memory
agent.sinks    = lake

agent.sources.web.type = TAILDIR
agent.sources.web.filegroups = f1
agent.sources.web.filegroups.f1 = /var/log/shop/events.*.json
agent.sinks.lake.type = hdfs
agent.sinks.lake.hdfs.path = /novamarket/lake/bronze/web_events/%Y-%m-%d
agent.sinks.lake.hdfs.rollInterval = 300

The TAILDIR source follows the web server's event files as they grow, and the sink writes them to one folder per day, closing a file every 300 seconds. That rollInterval is a delicate trade-off: if it is short, HDFS fills up with small files (lesson 02-01).

Status. Largely replaced. The dominant pattern today is the one from lesson 03-05: events are published to Kafka and loaded from there into the lake with Kafka Connect or a stream processing engine; to collect server logs, lightweight agents such as Fluent Bit or Vector are used. The Flume project has had hardly any activity for years; check its current status before considering it.

Oozie and ZooKeeper: scheduling and coordination

Apache Oozie is Hadoop's classic orchestrator: it defines workflows as a graph of actions (a Hive job, then a Sqoop one, then a script) and coordinators that launch them at a set time or when the data arrives. It solves the same problem as the novamarket_daily DAG from lesson 03-06, but workflows are written in very verbose XML and only know about the Hadoop world. Status: replaced by Apache Airflow and similar orchestrators, which define workflows in Python and talk to any system. The project is inactive; anyone with workflows in Oozie should be planning to move them.

Apache ZooKeeper does not process data: it is a coordination service. It stores small pieces of shared information in a replicated, consistent way, and makes it possible to answer questions that are hard in a distributed system: which node is the leader right now? Which nodes are still alive? What is the current configuration? In terms of the CAP theorem (lesson 01-04), it is a CP system: it would rather not answer than give an inconsistent answer.

  • In HDFS it decides which NameNode is active when there are two in high availability.
  • In HBase it records which server handles each range of each table.
  • In Kafka it held the cluster metadata for years, until Kafka replaced it with its own mechanism (KRaft, lesson 06-03).

Status. Active and still essential for HDFS with high availability and for HBase. You will rarely use it directly, but it will show up in troubleshooting: if ZooKeeper loses its quorum (the majority of its nodes, which is why it is deployed with 3 or 5), half the cluster grinds to a halt.

Other pieces: Tez, Ranger, Atlas and Ambari

Project What it is Status
Apache Tez Execution engine that replaces MapReduce under Hive: it runs a whole DAG without writing to disk between steps Current as Hive's engine; hardly used outside Hive
Apache Ranger Centralised access control: policies on who can read which table, column or row, plus access auditing Active; the standard on Hadoop platforms
Apache Atlas Metadata and lineage catalogue: which tables exist, where each one comes from, how it is classified Active, at a slow pace; competes with more recent catalogues
Apache Ambari Web interface for installing, configuring and monitoring the cluster Went through the Attic and was revived; check its status if you need it

Ranger and Atlas are Hadoop's answer to two needs you already know: the classification and lineage of lesson 05-02, and the access control that will be covered in lesson 07-01.

Distributions, the cloud and the lakehouse: what became of the Hadoop cluster

Installing twenty projects and getting their versions to work with one another is an enormous job. That is how distributions came about: companies that packaged the ecosystem, already tested, and sold support.

  • Cloudera (2008), Hortonworks (2011, spun out of Yahoo) and MapR (2009, with its own file system) were the big three.
  • In 2019, Cloudera and Hortonworks merged, and MapR's assets were acquired by HPE. It was the clearest sign that the market had shrunk.
  • Today one reference commercial distribution remains, Cloudera (formerly called Cloudera Data Platform, or CDP), which runs in on-premises data centres and in the cloud and has incorporated Spark, Iceberg, Kafka and Flink alongside the classic components.

What displaced the Hadoop cluster? Three linked changes that you have been seeing throughout the course:

  1. Object storage (lesson 02-01). Cheaper and with no administration. It undid Hadoop's premise, which was to store and compute on the same machines.
  2. Spark (lesson 03-02). It replaced MapReduce and, along with it, Hive as an engine, and Pig.
  3. The lakehouse (lesson 02-05). Open table formats gave files the guarantees that used to require a separate data warehouse.
flowchart LR
    A["2006-2015<br/>Own Hadoop cluster<br/>HDFS + YARN + Hive"] --> B["2015-2020<br/>Managed Hadoop in the cloud<br/>Spark on YARN, data in objects"]
    B --> C["2020 onwards<br/>Lakehouse<br/>objects + table format + ephemeral engines"]

Hadoop did not disappear: it dissolved. Its ideas and several of its components live on inside today's platforms, but hardly anyone builds a new Hadoop cluster any more.

From the classic component to its current replacement

Classic component Function Usual replacement today Status of the classic
HDFS Storage Object storage (S3, ADLS, GCS) Current in on-premises installations
YARN Resource management Kubernetes; serverless services Current on existing clusters
MapReduce Batch processing Spark Legacy processes only
Hive (engine) SQL over files Spark SQL, Trino, cloud engines In evolutionary maintenance
Hive Metastore Technical catalogue Still in use; Glue Data Catalog, Unity Catalog, Iceberg REST catalogues Very much alive
HBase NoSQL by key Cassandra, Bigtable, DynamoDB Active
Pig Transformations Spark DataFrames Obsolete
Sqoop Relational ingestion Spark JDBC, Debezium (CDC), Airbyte, managed services Retired (Attic)
Flume Log ingestion Kafka + Kafka Connect, Fluent Bit, Vector No noticeable activity
Oozie Orchestration Airflow, Dagster, Prefect Inactive
ZooKeeper Coordination KRaft in Kafka; etcd in Kubernetes Active
Ranger / Atlas Security and governance Each platform's governance catalogues Active
Ambari / Cloudera Manager Administration The cloud provider's console Depends on the product

The status of projects changes. Before making a decision that depends on one of them, check its page on apache.org: the date of the latest release and the list of Attic projects tell you more than any article.

How to read a legacy Hadoop cluster and how to migrate it

Imagine you change jobs and arrive at a company with a Hadoop cluster from 2016. Here is how to find your way around:

  1. Start with the Metastore. SHOW DATABASES and SHOW TABLES in Hive, and DESCRIBE FORMATTED table to see columns, format and folder. It is the most reliable inventory there is.
  2. Look at the real volume. hdfs dfs -du -h /path (lesson 02-01) tells you how much space each zone takes up. There is usually a lot of data that nobody reads.
  3. Find out who launches things. The Oozie coordinators (or the cron on some server) are the dependency map: what runs, when and in what order.
  4. Classify the processes by engine: HiveQL, Pig, MapReduce in Java, Spark. This is the measure of the migration effort.
  5. Ask about security. If there is Kerberos and Ranger, there are access policies that will have to be reproduced in the target.

And here is a high-level migration strategy, which is rarely a "big bang":

Phase What is done Why in this order
1. Inventory Tables, processes, consumers and actual usage You do not migrate what nobody uses
2. Data Copy HDFS to object storage; convert anything that is not already Parquet or a table format The data is what holds the value; everything else is replaceable
3. Catalogue Move the Metastore definitions to the target catalogue Lets the new engines read from day one
4. Processes HiveQL → Spark SQL or dbt (small changes); Pig and MapReduce → PySpark (rewrite); Oozie → Airflow From the most mechanical to the most costly
5. Coexistence Run in parallel and compare results (lesson 05-02) It is the only proof that the migration is correct
6. Shutdown Retire the cluster piece by piece As long as it stays switched on, you pay twice

For NovaMarket, which was born without Hadoop, the lesson is a different one: its lake on object storage, its partitioned tables and its catalogue are direct descendants of this ecosystem. Laura does not administer a NameNode, but she thinks in its concepts.

Common Mistakes and Tips

  • Saying "Hadoop is dead" or "Hadoop is the same as ever". Both are false. Distinguish piece by piece: the Metastore and HBase are alive; Sqoop, Pig and Oozie should not be chosen for anything new.
  • Confusing Hive with its Metastore. A platform can use the Metastore without ever running a single query on the Hive engine.
  • Forgetting to register partitions. A partitioned external table appears empty until you run MSCK REPAIR TABLE or add the partitions. If a query returns zero rows and the files are there, start here.
  • Believing that DROP TABLE always deletes the data, or that it never does. On an external table it does not; on a managed table, it does. Check the type with DESCRIBE FORMATTED first.
  • Treating HBase as a relational database. With no joins or native secondary indexes, a badly chosen row key forces a scan of the entire table.
  • Adopting a retired project because "it's already installed". A component without security patches is a debt that keeps growing. The fact that it is on the cluster does not mean it should be used in new developments.
  • Migrating processes before data and catalogue. Without accessible data in the target, there is nothing to compare.

Exercises

Exercise 1: declaring an external table

On the imaginary cluster, silver/orders_complete lives in /novamarket/lake/silver/orders_complete, in Parquet and unpartitioned. Its columns are those of orders plus the boolean amount_rebuilt (lesson 03-03). Write the CREATE EXTERNAL TABLE and a HiveQL query that returns sales excluding returns by channel. Do you need MSCK REPAIR TABLE?

Exercise 2: from Pig to PySpark

Translate this lesson's Pig Latin script (purchases by device) into PySpark, reading from silver/web_events in your lake. This one you can run.

Exercise 3: migration plan

A company has: 40 TB in HDFS (half of it in text files), 120 HiveQL queries scheduled with Oozie, 15 Pig scripts, 3 MapReduce jobs in Java, daily loads with Sqoop and policies in Ranger. Put in order what you would migrate first and to what, and point out the riskiest part.

Solutions

Exercise 1

CREATE EXTERNAL TABLE novamarket.orders_complete (
    order_id             INT,
    customer_id          INT,
    order_date           TIMESTAMP,
    total_amount         DOUBLE,
    status               STRING,
    channel              STRING,
    amount_rebuilt       BOOLEAN
)
STORED AS PARQUET
LOCATION '/novamarket/lake/silver/orders_complete';

SELECT channel, COUNT(*) AS orders, ROUND(SUM(total_amount), 2) AS sales
FROM novamarket.orders_complete
WHERE status <> 'returned'
GROUP BY channel;

You do not need MSCK REPAIR TABLE: the table is not partitioned, so Hive reads the files in the folder directly. With your data, the result would be 7,598 orders and €12,749,007.27 in app, and 11,401 orders and €19,149,250.26 in web.

Common mistake: declaring types that do not match those in the Parquet files (for example, total_amount as DECIMAL when the file contains double). Hive does not convert the files: the query fails or returns nulls.

Exercise 2

from pathlib import Path

from pyspark.sql import SparkSession

LAKE = Path.home() / "novamarket" / "lake"
spark = SparkSession.builder.master("local[*]").appName("pig_to_spark").getOrCreate()
spark.sparkContext.setLogLevel("ERROR")

events = spark.read.parquet(str(LAKE / "silver" / "web_events"))     # LOAD
purchases = events.where("event_type = 'purchase'")                  # FILTER
counts = purchases.groupBy("device").count()                         # GROUP + FOREACH
counts.show()                                                        # STORE (here, display)
spark.stop()

The correspondence is almost one to one. The rows should add up to 8,070, June's purchases after deduplication (lesson 04-02); one of the rows will have a null device, because of the events that lack that field.

Exercise 3

A reasonable order:

  1. Usage inventory. Out of 120 queries, it is common for some to have no consumers any more. They are dropped.
  2. Data. Copy to object storage, converting the 20 TB of text to Parquet: this will greatly reduce the volume and the cost of every read (lesson 02-02).
  3. Catalogue. Export the Metastore definitions to the target catalogue.
  4. Ingestion. Replace Sqoop as soon as possible, because it is retired: Spark JDBC for full or incremental loads, CDC if more freshness is needed.
  5. HiveQL queries to Spark SQL or dbt: there are many of them, but the work is mechanical. Oozie to Airflow in parallel, workflow by workflow.
  6. Pig (15) and MapReduce (3) to PySpark: few of them, but it is a rewrite.
  7. Coexistence with comparison of results, and shutdown piece by piece.

The riskiest part is not technical: it is the Ranger policies. Reproducing a permission incorrectly in the target can expose confidential data, and nobody will notice because nothing fails. They must be migrated with an explicit review by the people responsible for security. The second riskiest is the three MapReduce jobs in Java: they tend to contain old business logic that nobody remembers.

Conclusion

The Hadoop ecosystem was the first complete Big Data platform, and each of its pieces answered a need that still exists: Hive provided SQL over files and left the Metastore as its legacy, the catalogue that today's engines still use; HBase added access by key; Pig anticipated DataFrames; Sqoop and Flume handled ingestion; Oozie, scheduling; ZooKeeper, coordination; Ranger and Atlas, security and governance. The needs remain, but almost all the pieces have changed: object storage, Spark and the lakehouse dissolved the classic cluster, and today the useful question to ask about each component is whether it is still maintained and what replaces it. With that table and a method for reading and migrating a legacy cluster, you can walk into a 2016 installation without getting lost.

The main player in that replacement has been Spark, which you know well as an engine but not as a platform. The next lesson, The Apache Spark Ecosystem, completes the picture: the libraries you have not used yet, such as graph processing or the pandas API, the cluster managers it is deployed on, the connectors that link it to the rest of the world and, just as importantly, the cases in which Spark is not the right tool.

© Copyright 2026. All rights reserved