Big Data
Intermediate 15 min read Big Data

Hadoop Ecosystem

The stack that defined distributed data

The Hadoop ecosystem is the original big-data stack: HDFS for storage, YARN for resource management, MapReduce/Spark for compute and Hive for SQL-on-Hadoop. Much of it lives on as ideas inside modern warehouses.

HadoopHDFSYARNHiveMapReducedistributed file system
Before we start

What you will learn

  • Name the core Hadoop components and their roles
  • Explain how HDFS provides reliable storage on commodity hardware
  • Describe how Hive and Spark replaced raw MapReduce for most work
Introduction

What is this?

Hadoop is an open-source ecosystem that made distributed big-data processing practical: HDFS (distributed, fault-tolerant file storage), YARN (cluster resource scheduling), and a compute layer that evolved from MapReduce to Spark, with Hive and Spark SQL adding SQL interfaces. Its ideas — replication, moving compute to data, fault-tolerant jobs — are the foundation of almost every modern warehouse and lake.

Motivation

Why do you need it?

  • HDFS let companies store petabytes on commodity servers instead of a storage array.
  • YARN shared one cluster between many jobs, raising utilization and cutting cost.
  • SQL-on-Hadoop (Hive) made big data usable by analysts, not just Java engineers.
  • Understanding Hadoop explains why Spark, Snowflake and data lakes work the way they do.
Think about it

Mental model

Imagine

A library run by a team of librarians

Think of

The Hadoop ecosystem

HDFS divides the books among shelves (nodes) and keeps copies of each book on several shelves; YARN schedules which librarian handles which task; MapReduce/Spark are the workflows they execute.

Mechanics

How it works

  • HDFS splits files into 128MB blocks and stores each block on multiple nodes for redundancy.
  • A NameNode tracks block locations; DataNodes store the blocks and report health.
  • YARN allocates CPU/memory containers across the cluster for running jobs.
  • MapReduce executes jobs as map tasks (process each block) + reduce tasks (combine results).
  • Hive translates SQL into MapReduce/Spark jobs, giving analysts warehouse-like queries.

The Hadoop stack.

HDFS
YARN
Compute
SQL layer
Consumers
Real world

In production

  • A media company stores raw video telemetry in HDFS and runs nightly Hive scripts for watch-time analytics.
  • A bank runs spark-submit against YARN for batch risk calculations, sharing the cluster with stream jobs.
  • A warehouse's own storage layer mimics HDFS's replicated-block design internally.
Guidelines

Best practices

  • Right-size HDFS block counts (128–256MB) to avoid millions of tiny files hammering the NameNode.
  • Use the cluster's SQL interface (Hive/Spark SQL) instead of hand-writing MapReduce.
  • Compress intermediate and long-tail data (Snappy/Parquet) to cut I/O.
  • Monitor NameNode and YARN queues — they are the single points of coordination.
Watch out

Common mistakes

  • Storing millions of small files, which overwhelms the NameNode's metadata capacity.
  • Running the job's logic in a driver that fat-fingers everything through one node.
  • Ignoring replication factor and losing data to a rack failure.
  • Treating 'SQL on Hadoop' as if it had a warehouse's indexing and tuning — it does not.
Root cause analysis

Common issues

Error
HDFS cluster runs out of block slots
Root cause

Too many small files consuming NameNode memory

Fix

Coalesce inputs, use a single large file strategy, or move to object storage.

Error
Jobs starve each other on shared cluster
Root cause

YARN queues not configured with fair scheduling

Fix

Partition YARN into queues with capacity guarantees per team.

Error
NameNode is a bottleneck for metadata reads
Root cause

Millions of list/open operations on small files

Fix

Consolidate files and cache hot metadata; consider an object-store-backed table format.

When things break

Debugging tips

  • Small-file storm? Check block counts and file count per directory.
  • Slow reads often mean replication loss or a busy node; check DataNode health.
  • NameNode down = whole filesystem down; give it solid hardware and HA.
  • Profile shuffles in MapReduce — most performance bugs live in the shuffle.
Interviews

Interview checkpoint

Test yourself

Quick quiz

0/2
1

Which component of Hadoop is responsible for allocating CPU and memory to jobs?

2

HDFS keeps replicas of file blocks so a node failure doesn't lose data.

Go deeper

Official documentation