Apache Hadoop

Also known as: Hadoop

On this page 7

Apache Hadoop is an open-source framework for distributed storage and batch processing of very large datasets across clusters of commodity servers. In data processing, Hadoop made it practical to handle terabytes to petabytes of data by spreading both the files and the computation over hundreds or thousands of machines, and by moving computation to the data instead of moving data across the network.

Hadoop grew out of work by Doug Cutting and Mike Cafarella around 2006, inspired by published Google designs for a distributed file system and the MapReduce programming model. Maintained by the Apache Software Foundation and written mainly in Java, it became the foundation of the big data ecosystem of the 2010s, and its storage layer and resource manager still run beneath many newer engines.

Core components of Hadoop

Hadoop consists of four core modules that separate storage, resource management and computation. This separation is what allowed later engines to reuse Hadoop clusters without replacing them.

ModuleRoleKey processes
HDFSDistributed, fault-tolerant file systemNameNode, DataNodes
YARNCluster resource management and schedulingResourceManager, NodeManagers
MapReduceBatch programming model and engineMap tasks, reduce tasks
Hadoop CommonShared libraries and utilitiesConfiguration, RPC, security
The four core modules of Apache Hadoop

HDFS (Hadoop Distributed File System) splits each file into large blocks, 128 MB by default, and stores each block on several DataNodes, with a replication factor of 3 as the usual default. A single NameNode keeps the file system metadata in memory, which makes it a critical component; production clusters run a standby NameNode for high availability. Since Hadoop 3, erasure coding can replace triple replication for cold data and cut storage overhead roughly in half.

How Hadoop processes data

A Hadoop job runs where the data already lives, a principle called data locality. YARN allocates containers of CPU and memory on nodes, preferably those holding the relevant HDFS blocks, and a per-job ApplicationMaster coordinates the tasks.

In the classic MapReduce engine, map tasks read input splits and emit key-value pairs, a shuffle and sort phase groups pairs by key across the network, and reduce tasks aggregate each group. Intermediate results are written to local disk between stages, which makes jobs resilient but slow for iterative work.

Fault tolerance is built into both layers. If a DataNode fails, HDFS re-replicates its blocks from surviving copies; if a task fails, YARN reschedules it on another node. The framework therefore assumes that hardware failure is normal, not exceptional, which is why inexpensive servers suffice.

The table below summarizes the main configuration parameters that shape how a Hadoop cluster stores and processes data.

ParameterCommon defaultWhat it affects
dfs.blocksize128 MBNumber of map tasks and NameNode load
dfs.replication3Durability and raw storage overhead
yarn.nodemanager.resource.memory-mbSet per node hardwareMemory available for containers
mapreduce.job.reduces1Parallelism of the reduce phase
Key Hadoop parameters and their effect

The Hadoop ecosystem

Around the core modules, a broad ecosystem of projects added SQL, NoSQL storage, ingestion and workflow capabilities. Many of them are less common today, but they explain why Hadoop is often used as a name for an entire platform.

ProjectPurposeCurrent status
Apache HiveSQL queries over HDFS dataWidely used, metastore still central
Apache HBaseWide-column store on HDFSActive, niche workloads
Apache SparkIn-memory distributed engineDominant processing engine
Apache PigScripted data flowsLargely retired
Apache SqoopRelational database import and exportRetired to the Apache Attic
Apache OozieWorkflow schedulingMostly replaced by newer orchestrators
Selected projects in the Hadoop ecosystem

Hadoop compared with newer processing engines

Hadoop MapReduce is a disk-oriented batch engine, while newer frameworks keep intermediate data in memory or target streaming. Hadoop storage and YARN, however, can host those engines, so the comparison mostly concerns the processing layer.

AspectHadoop MapReduceApache SparkCloud data warehouses
Processing styleBatch, disk between stagesBatch and micro-batch, in memorySQL, managed engine
Iterative workloadsSlowFastLimited to SQL patterns
StorageHDFSHDFS, object storage, othersProprietary managed storage
Operations effortHigh, self-managed clusterMedium to highLow, provider-managed
Cost modelOwned hardwareOwned or cloud clustersPay per use
Hadoop MapReduce and related frameworks

In practice, Spark on YARN reading HDFS became a common pattern, and many organizations later replaced HDFS with cloud object storage such as Amazon S3, which Hadoop accesses through the S3A connector. Hadoop thus survives more as infrastructure and libraries than as a programming model.

When Hadoop fits and its limitations

Hadoop remains a reasonable choice for large on-premises batch workloads, regulated environments that must keep data in their own data centers, and organizations with existing clusters and skills. It is a poor fit for low-latency queries, small datasets and teams without dedicated operations staff.

  • Small files problem: millions of tiny files overload NameNode memory; files should be merged or stored in container formats such as Parquet or ORC.
  • Operational complexity: configuration, upgrades, Kerberos security and capacity planning require specialist skills.
  • Latency: MapReduce job startup and disk writes make interactive analysis slow.
  • Coupled storage and compute: scaling storage means adding servers with CPUs that may sit idle, a key reason for the move to separated cloud architectures.

Put simply

Hadoop is a way to make many ordinary computers work as one large machine for storing and processing huge amounts of data. Instead of buying one enormous and expensive server, a company connects hundreds of normal ones.

Each file is cut into pieces, and every piece is copied to several computers, so nothing is lost when one breaks. When a task needs doing, each computer works on the pieces it already holds, and the partial results are combined at the end. The key idea: split the data, copy it, and send the work to it.

In practice

A national telecommunications operator collects call detail records and network logs amounting to roughly 20 terabytes per day. Regulations require keeping the raw data in its own data centers for several years, so a public cloud warehouse is not an option.

The operator runs an on-premises Hadoop cluster of about 300 nodes. Raw records land in HDFS every hour, older partitions are converted to Parquet and stored with erasure coding, and nightly Hive and Spark jobs scheduled through YARN compute billing aggregates, dropped-call statistics per cell tower and fraud indicators.

Because storage and processing run on the same machines, the nightly jobs finish within a four-hour batch window, and the failure of individual servers, which happens several times a month, does not interrupt processing. Analysts query the aggregated tables each morning to plan network maintenance.