Question 11 of 15 · CIE-2 QB · Set 1 · 6 marks
Open in ChatGPTDescribe about Apache Hadoop, Amazon Elastic MapReduce, and Apache Pig based on architecture, processing capabilities, and programming abstractions.
Introduction
Hadoop, Amazon EMR and Apache Pig sit at three different levels of the same stack: a framework, a managed service that runs it, and a language that writes jobs for it.
Apache Hadoop
- Architecture: HDFS stores blocks on data nodes with a name node holding the metadata; YARN splits resource management (ResourceManager) from per-node execution (NodeManager).
- Processing: MapReduce runs on YARN; a task runs where its block lives.
- Abstraction: the
mapandreducefunctions, plus a job configuration. Low-level and repetitive.
Amazon Elastic MapReduce (EMR)
- Architecture: a managed cluster of EC2 instances with a master, core and task nodes, provisioned by AWS and terminated on request.
- Processing: runs Hadoop, Spark, Hive and Presto; the user chooses the framework.
- Abstraction: the framework's own API. EMR adds provisioning, scaling, monitoring and spot-instance handling, and removes cluster administration.
Apache Pig
- Architecture: a client compiles a Pig Latin script into a series of MapReduce (or Tez/Spark) jobs and submits them.
- Processing: a data-flow language:
LOAD,FILTER,GROUP,JOIN,FOREACH,STORE. - Abstraction: a relational, declarative script. The engine chooses the number of jobs and the join strategy, so the programmer writes the what, not the how.
Comparison
| Point | Hadoop | EMR | Pig |
|---|---|---|---|
| Kind | Framework | Managed service | Query language |
| You manage | Cluster | Nothing | Job logic |
| Abstraction | map/reduce API | Framework choice | Data flow script |
| Elasticity | Manual | Automatic | Runs on either |
Example
Word count in Pig is five lines: load the text, split into words, group by word, count each group, store. The same job in Hadoop Java needs a mapper class, a reducer class and a driver.
Conclusion
Hadoop is the substrate, EMR is the same substrate rented by the hour, and Pig is a dialect of SQL-like thinking on top of it. They compose rather than compete.