Apache Hadoop#HDFS

{{short description|Distributed data processing framework}}

{{Infobox software

| name = Apache Hadoop

| logo = Hadoop logo new.svg

| logo_size = 200px

| screenshot =

| caption =

| author = Doug Cutting, Mike Cafarella

| developer = Apache Software Foundation

| released = {{Start date and age|2006|04|01}}{{cite web |url=https://archive.apache.org/dist/hadoop/common/ |title=Hadoop Releases |website=apache.org |publisher=Apache Software Foundation |access-date=2019-04-28}}

| latest release version = {{Multiple releases

|branch1 = 2.10.x

|version1 = 2.10.2

|date1 = {{Start date and age|2022|05|31}}{{cite web|url=https://hadoop.apache.org/releases.html|title=Apache Hadoop|access-date=27 September 2022}}

|branch2 = 3.4.x

|version2 = 3.4.0

|date2 = {{Start date and age|2024|03|17}}

}}

| latest release date =

| operating system = Cross-platform

| repo = {{URL|https://gitbox.apache.org/repos/asf?p{{=}}hadoop.git|Hadoop Repository}}

| programming language = Java

| genre = Distributed file system

| license = Apache License 2.0

| website = {{Official URL}}

}}

Apache Hadoop ({{IPAc-en|pron|h|ə|ˈ|d|u:|p}}) is a collection of open-source software utilities for reliable, scalable, distributed computing. It provides a software framework for distributed storage and processing of big data using the MapReduce programming model. Hadoop was originally designed for computer clusters built from commodity hardware, which is still the common use.{{cite web |last=Judge |first=Peter |date=2012-10-22 |title=Doug Cutting: Big Data Is No Bubble |url=http://www.silicon.co.uk/workspace/doug-cutting-big-data-is-not-a-bubble-96694 |access-date=2018-03-11 |website=silicon.co.uk}} It has since also found use on clusters of higher-end hardware.{{cite web |url=https://www.datanami.com/2014/05/12/hadoop-ibm-power/ |title=Why Hadoop on IBM Power |last=Woodie |first=Alex |date=2014-05-12 |website=datanami.com |publisher=Datanami |access-date=2018-03-11}}{{cite web |url=https://www.hpcwire.com/2014/10/15/cray-launches-hadoop-hpc-airspace/ |title=Cray Launches Hadoop into HPC Airspace |last=Hemsoth |first=Nicole |date=2014-10-15 |website=hpcwire.com |access-date=2018-03-11}} All the modules in Hadoop are designed with a fundamental assumption that hardware failures are common occurrences and should be automatically handled by the framework.{{Cite web|title= Welcome to Apache Hadoop!|url= http://hadoop.apache.org|website= hadoop.apache.org|access-date = 2016-08-25}}

Overview

The core of Apache Hadoop consists of a storage part, known as Hadoop Distributed File System (HDFS), and a processing part which is a MapReduce programming model. Hadoop splits files into large blocks and distributes them across nodes in a cluster. It then transfers packaged code into nodes to process the data in parallel. This approach takes advantage of data locality,{{cite web |title=What is the Hadoop Distributed File System (HDFS)? |url=https://www.ibm.com/analytics/hadoop/hdfs |access-date=2021-04-12 |website=ibm.com |publisher=IBM}} where nodes manipulate the data they have access to. This allows the dataset to be processed faster and more efficiently than it would be in a more conventional supercomputer architecture that relies on a parallel file system where computation and data are distributed via high-speed networking.{{cite web |last1=Malak |first1=Michael |date=2014-09-19 |title=Data Locality: HPC vs. Hadoop vs. Spark |url=http://www.datascienceassn.org/content/data-locality-hpc-vs-hadoop-vs-spark |access-date=2014-10-30 |website=datascienceassn.org |publisher=Data Science Association}}{{cite book |last1=Wang |first1=Yandong |title=2014 IEEE 28th International Parallel and Distributed Processing Symposium |last2=Goldstone |first2=Robin |last3=Yu |first3=Weikuan |last4=Wang |first4=Teng |date=October 2014 |publisher=IEEE |isbn=978-1-4799-3800-1 |pages=799–808 |chapter=Characterization and Optimization of Memory-Resident MapReduce on HPC Systems |doi=10.1109/IPDPS.2014.87 |s2cid=11157612}}

The base Apache Hadoop framework is composed of the following modules:

  • Hadoop Common – contains libraries and utilities needed by other Hadoop modules;
  • Hadoop Distributed File System (HDFS) – a distributed file-system that stores data on commodity machines, providing very high aggregate bandwidth across the cluster;
  • Hadoop YARN – (introduced in 2012) is a platform responsible for managing computing resources in clusters and using them for scheduling users' applications;{{cite web |date=2014-09-12 |title=Resource (Apache Hadoop Main 2.5.1 API) |url=http://hadoop.apache.org/docs/r2.5.1/api/org/apache/hadoop/yarn/api/records/Resource.html#newInstance(int,%20int) |url-status=dead |archive-url=https://web.archive.org/web/20141006090717/http://hadoop.apache.org/docs/r2.5.1/api/org/apache/hadoop/yarn/api/records/Resource.html#newInstance(int,%20int) |archive-date=2014-10-06 |access-date=2014-09-30 |website=apache.org |publisher=Apache Software Foundation}}{{cite web |last1=Murthy |first1=Arun |date=2012-08-15 |title=Apache Hadoop YARN – Concepts and Applications |url=http://hortonworks.com/blog/apache-hadoop-yarn-concepts-and-applications/ |access-date=2014-09-30 |website=hortonworks.com |publisher=Hortonworks}}
  • Hadoop MapReduce – an implementation of the MapReduce programming model for large-scale data processing.
  • Hadoop Ozone – (introduced in 2020) An object store for Hadoop

The term Hadoop is often used for both base modules and sub-modules and also the ecosystem,{{cite web |date=2012-11-14 |title=Continuuity Raises $10 Million Series A Round to Ignite Big Data Application Development Within the Hadoop Ecosystem |url=https://finance.yahoo.com/news/continuuity-raises-10-million-series-120500471.html |access-date=2014-10-30 |website=finance.yahoo.com |publisher=Marketwired}} or collection of additional software packages that can be installed on top of or alongside Hadoop, such as Apache Pig, Apache Hive, Apache HBase, Apache Phoenix, Apache Spark, Apache ZooKeeper, Apache Impala, Apache Flume, Apache Sqoop, Apache Oozie, and Apache Storm.{{cite web |title=Hadoop-related projects at |url=http://hadoop.apache.org/ |access-date=2013-10-17 |publisher=Hadoop.apache.org}}

Apache Hadoop's MapReduce and HDFS components were inspired by Google papers on MapReduce and Google File System.{{cite book |url=https://books.google.com/books?id=axruBQAAQBAJ&pg=PA300 |title=Data Science and Big Data Analytics: Discovering, Analyzing, Visualizing and Presenting Data |date=2014-12-19 |publisher=John Wiley & Sons |isbn=9781118876220 |page=300 |access-date=2015-01-29}}

The Hadoop framework itself is mostly written in the Java programming language, with some native code in C and command line utilities written as shell scripts. Perl language can be easily used with Hadoop Streaming to implement the map and reduce parts of the user's program.https://stackoverflow.com/questions/33779654/using-hadoop-streaming-with-perl-for-map-reduce

History

According to its co-founders, Doug Cutting and Mike Cafarella, the genesis of Hadoop was the Google File System paper that was published in October 2003.{{Cite news|url=https://www.oreilly.com/ideas/the-next-10-years-of-apache-hadoop|title=The next 10 years of Apache Hadoop|last1=Cutting|first1=Mike|last2=Cafarella|first2=Ben|last3=Lorica|first3=Doug|date=2016-03-31|work=O'Reilly Media|access-date=2017-10-12|language=en}}{{cite web|url=http://research.google.com/archive/gfs.html|title=The Google File System|first1=Sanjay|last1=Ghemawat|first2=Howard|last2=Gobioff|first3=Shun-Tak|last3=Leung|year=2003|pages=20–43}} This paper spawned another one from Google{{snd}} "MapReduce: Simplified Data Processing on Large Clusters".{{cite web|url=https://static.googleusercontent.com/media/research.google.com/en//archive/mapreduce-osdi04.pdf|title=MapReduce: Simplified Data Processing on Large Clusters|first1=Jeffrey|last1=Dean|first2=Sanjay|last2=Ghemawat|year=2004|pages=137–150}} Development started on the Apache Nutch project, but was moved to the new Hadoop subproject in January 2006.{{cite web|url=https://issues.apache.org/jira/browse/INFRA-700|title=new mailing lists request: hadoop|last=Cutting|first=Doug|date=28 Jan 2006|website=issues.apache.org|quote=The Lucene PMC has voted to split part of Nutch into a new sub-project named Hadoop}} Doug Cutting, who was working at Yahoo! at the time, named it after his son's toy elephant.{{cite news |title=Hadoop, a Free Software Program, Finds Uses Beyond Search |first=Ashlee |last=Vance |author-link=Ashlee Vance |newspaper=The New York Times |date=2009-03-17 |url=https://www.nytimes.com/2009/03/17/technology/business-computing/17cloud.html |access-date=2010-01-20 | archive-url= https://web.archive.org/web/20110830130350/http://www.nytimes.com/2009/03/17/technology/business-computing/17cloud.html|archive-date=30 August 2011| url-status=live }} The initial code that was factored out of Nutch consisted of about 5,000 lines of code for HDFS and about 6,000 lines of code for MapReduce.

In March 2006, Owen O'Malley was the first committer to add to the Hadoop project;{{cite mailing list|first=Doug|last=Cutting|author-link=Doug Cutting|title=[RESULT] VOTE: add Owen O'Malley as Hadoop committer|mailing-list=hadoop-common-dev|date=30 March 2006|url=http://mail-archives.apache.org/mod_mbox/hadoop-common-dev/200603.mbox/%3C442B27A6.8080500@apache.org%3E}} Hadoop 0.1.0 was released in April 2006.{{cite web|url=https://archive.apache.org/dist/hadoop/core/|title=Index of /dist/hadoop/core|website=archive.apache.org|access-date=11 December 2017}} It continues to evolve through contributions that are being made to the project.{{cite web|url=https://hadoop.apache.org/who.html|title=Who We Are|website=hadoop.apache.org|access-date=11 December 2017}} The first design document for the Hadoop Distributed File System was written by Dhruba Borthakur in 2007.{{Cite web|last=Borthakur|first=Dhruba|date=2006|title=The Hadoop Distributed File System: Architecture and Design|url=http://svn.apache.org/repos/asf/hadoop/common/tags/release-0.10.0/docs/hdfs_design.pdf|website=Apache Hadoop Code Repository}}

class="wikitable"
Version

! Original release date

! Latest version

! Release date

{{Version|o|0.10}}

|

| 0.10.1

| 2007-01-11

{{Version|o|0.11}}

|

| 0.11.2

| 2007-02-16

{{Version|o|0.12}}

| 2007-03-02

| 0.12.3

| 2007-04-06

{{Version|o|0.13}}

| 2007-06-04

| 0.13.1

| 2007-07-23

{{Version|o|0.14}}

| 2007-09-04

| 0.14.4

| 2007-11-26

{{Version|o|0.15}}

| 2007-10-29

| 0.15.3

| 2008-01-18

{{Version|o|0.16}}

| 2008-02-07

| 0.16.4

| 2008-05-05

{{Version|o|0.17}}

| 2008-05-20

| 0.17.2

| 2008-08-19

{{Version|o|0.18}}

| 2008-08-22

| 0.18.3

| 2009-01-29

{{Version|o|0.19}}

| 2008-11-21

| 0.19.2

| 2009-07-23

{{Version|o|0.20}}

| 2009-04-22

| 0.20.205.0

| 2011-10-17

{{Version|o|0.21}}

| 2011-05-11

| 0.21.0

|

{{Version|o|0.22}}

| 2011-12-10

| 0.22.0

|

{{Version|o|0.23}}

| 2011-11-11

| 0.23.11

| 2014-06-27

{{Version|o|1.0}}

| 2011-12-27

| 1.0.4

| 2012-10-12

{{Version|o|1.1}}

| 2012-10-13

| 1.1.2

| 2013-02-15

{{Version|o|1.2}}

| 2013-05-13

| 1.2.1

| 2013-08-01

{{Version|o|2.0}}

| 2012-05-23

| 2.0.6-alpha

| 2013-08-23

{{Version|o|2.1}}

| 2013-08-25

| 2.1.1-beta

| 2013-09-23

{{Version|o|2.2}}

| 2013-12-11

| 2.2.0

|

{{Version|o|2.3}}

| 2014-02-20

| 2.3.0

|

{{Version|o|2.4}}

| 2014-04-07

| 2.4.1

| 2014-06-30

{{Version|o|2.5}}

| 2014-08-11

| 2.5.2

| 2014-11-19

{{Version|o|2.6}}

| 2014-11-18

| 2.6.5

| 2016-10-08

{{Version|o|2.7}}

| 2015-04-21

| 2.7.7

| 2018-05-31

{{Version|o|2.8}}

| 2017-03-22

| 2.8.5

| 2018-09-15

{{Version|o|2.9}}

| 2017-12-17

| 2.9.2

| 2018-11-19

{{Version|co|2.10}}

| 2019-10-29

| 2.10.2

| 2022-05-31{{cite web |author= |title=Release 2.10.2 available |url=https://hadoop.apache.org/release/2.10.2.html |website=hadoop.apache.org }}

{{Version|o|3.0}}

| 2017-12-13{{cite web |author= |title=Release 3.0.0 generally available |url=https://hadoop.apache.org/release/3.0.0.html |website=hadoop.apache.org }}

| 3.0.3

| 2018-05-31{{cite web |author= |title=Release 3.0.3 available |url=https://hadoop.apache.org/release/3.0.3.html |website=hadoop.apache.org }}

{{Version|o|3.1}}

| 2018-04-06

| 3.1.4

| 2020-08-03{{cite web |author= |title=Release 3.1.4 available |url=https://hadoop.apache.org/release/3.1.4.html |website=hadoop.apache.org }}

{{Version|c|3.2}}

| 2019-01-16

| 3.2.4

| 2022-07-22{{cite web |author= |title=Release 3.2.4 available |url=https://hadoop.apache.org/release/3.2.4.html |website=hadoop.apache.org }}

{{Version|c|3.3}}

| 2020-07-14

| 3.3.6

| 2023-06-23{{cite web |author= |title=Release 3.3.6 available |url=https://hadoop.apache.org/release/3.3.6.html |website=hadoop.apache.org }}

{{Version|c|3.4}}

| 2024-03-17

| 3.4.0

| 2024-07-17{{cite web |author= |title=Release 3.4.0 available |url=https://hadoop.apache.org/release/3.4.0.html |website=hadoop.apache.org}}

colspan="4" | {{Version |l |show=111111}}

Architecture

{{See also|#Hadoop_distributed_file_system|Apache HBase|MapReduce|l1=Hadoop Distributed File System}}

Hadoop consists of the Hadoop Common package, which provides file system and operating system level abstractions, a MapReduce engine (either MapReduce/MR1 or YARN/MR2){{cite web |url=http://blog.cloudera.com/blog/2012/10/mr2-and-yarn-briefly-explained/ |title=MR2 and YARN Briefly Explained |first=Harsh |last=Chouraria |date=21 October 2012 |website=Cloudera.com |access-date=23 October 2013 |archive-url=https://web.archive.org/web/20131022080058/http://blog.cloudera.com/blog/2012/10/mr2-and-yarn-briefly-explained/ |archive-date=22 October 2013 |url-status=dead }} and the Hadoop Distributed File System (HDFS). The Hadoop Common package contains the Java Archive (JAR) files and scripts needed to start Hadoop.

For effective scheduling of work, every Hadoop-compatible file system should provide location awareness, which is the name of the rack, specifically the network switch where a worker node is. Hadoop applications can use this information to execute code on the node where the data is, and, failing that, on the same rack/switch to reduce backbone traffic. HDFS uses this method when replicating data for data redundancy across multiple racks. This approach reduces the impact of a rack power outage or switch failure; if any of these hardware failures occurs, the data will remain available.{{cite web |url=http://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html |title=HDFS User Guide |publisher=Hadoop.apache.org |access-date=2014-09-04 }}

File:Hadoop 1.png

A small Hadoop cluster includes a single master and multiple worker nodes. The master node consists of a Job Tracker, Task Tracker, NameNode, and DataNode. A slave or worker node acts as both a DataNode and TaskTracker, though it is possible to have data-only and compute-only worker nodes. These are normally used only in nonstandard applications.{{cite web |title=Running Hadoop on Ubuntu Linux System(Multi-Node Cluster) |url=http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-multi-node-cluster/ }}

Hadoop requires the Java Runtime Environment (JRE) 1.6 or higher. The standard startup and shutdown scripts require that Secure Shell (SSH) be set up between nodes in the cluster.{{cite web |title=Running Hadoop on Ubuntu Linux (Single-Node Cluster) |url=http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/#prerequisites |access-date=6 June 2013 }}

In a larger cluster, HDFS nodes are managed through a dedicated NameNode server to host the file system index, and a secondary NameNode that can generate snapshots of the namenode's memory structures, thereby preventing file-system corruption and loss of data. Similarly, a standalone JobTracker server can manage job scheduling across nodes. When Hadoop MapReduce is used with an alternate file system, the NameNode, secondary NameNode, and DataNode architecture of HDFS are replaced by the file-system-specific equivalents.

=File systems=

=={{Anchor|HDFS}}Hadoop distributed file system==

The Hadoop distributed file system (HDFS) is a distributed, scalable, and portable file system written in Java for the Hadoop framework. A Hadoop instance is divided into HDFS and MapReduce. HDFS is used for storing the data and MapReduce is used for processing data.

HDFS has five services as follows:

  1. Name Node
  2. Secondary Name Node
  3. Job tracker
  4. Data Node
  5. Task Tracker

Top three are Master Services/Daemons/Nodes and bottom two are Slave Services. Master Services can communicate with each other and in the same way Slave services can communicate with each other. Name Node is a master node and Data node is its corresponding Slave node and can talk with each other.

Name Node: HDFS consists of only one Name Node that is called the Master Node. The master node can track files, manage the file system and has the metadata of all of the stored data within it. In particular, the name node contains the details of the number of blocks, locations of the data node that the data is stored in, where the replications are stored, and other details. The name node has direct contact with the client.

Data Node: A Data Node stores data in it as blocks. This is also known as the slave node and it stores the actual data into HDFS which is responsible for the client to read and write. These are slave daemons. Every Data node sends a Heartbeat message to the Name node every 3 seconds and conveys that it is alive. In this way when Name Node does not receive a heartbeat from a data node for 2 minutes, it will take that data node as dead and starts the process of block replications on some other Data node.

Secondary Name Node: This is only to take care of the checkpoints of the file system metadata which is in the Name Node. This is also known as the checkpoint Node. It is the helper Node for the Name Node. The secondary name node instructs the name node to create & send fsimage & editlog file, upon which the compacted fsimage file is created by the secondary name node.{{Cite web|last=Balram|title=Big Data Hadoop Tutorial for Beginners|url=https://www.gyansetu.in/big-data-hadoop-tutorial-for-beginners|access-date=2021-03-11|website=www.gyansetu.in|language=en}}

Job Tracker: Job Tracker receives the requests for Map Reduce execution from the client. Job tracker talks to the Name Node to know about the location of the data that will be used in processing. The Name Node responds with the metadata of the required processing data.

Task Tracker: It is the Slave Node for the Job Tracker and it will take the task from the Job Tracker. It also receives code from the Job Tracker. Task Tracker will take the code and apply on the file. The process of applying that code on the file is known as Mapper.{{Cite web |url=https://hadoop.apache.org/DOCS/R2.7.5/HADOOP-PROJECT-DIST/HADOOP-HDFS/HDFSUSERGUIDE.HTML |title=Apache Hadoop 2.7.5 – HDFS Users Guide |access-date=19 June 2020 |archive-url=https://web.archive.org/web/20191023001222/http://hadoop.apache.org/docs/r2.7.5/hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html |archive-date=23 October 2019 |url-status=dead }}

Hadoop cluster has nominally a single namenode plus a cluster of datanodes, although redundancy options are available for the namenode due to its criticality. Each datanode serves up blocks of data over the network using a block protocol specific to HDFS. The file system uses TCP/IP sockets for communication. Clients use remote procedure calls (RPC) to communicate with each other.

HDFS stores large files (typically in the range of gigabytes to terabytes{{cite web |title=HDFS Architecture |url=http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsDesign.html#Large_Data_Sets |access-date=1 September 2013 }}) across multiple machines. It achieves reliability by replicating the data across multiple hosts, and hence theoretically does not require redundant array of independent disks (RAID) storage on hosts (but to increase input-output (I/O) performance some RAID configurations are still useful). With the default replication value, 3, data is stored on three nodes: two on the same rack, and one on a different rack. Data nodes can talk to each other to rebalance data, to move copies around, and to keep the replication of data high. HDFS is not fully POSIX-compliant, because the requirements for a POSIX file-system differ from the target goals of a Hadoop application. The trade-off of not having a fully POSIX-compliant file-system is increased performance for data throughput and support for non-POSIX operations such as Append.{{Cite book|first = Yaniv |last = Pessach|title = Distributed Storage: Concepts, Algorithms, and Implementations|date = 2013 |ol = 25423189M }}

In May 2012, high-availability capabilities were added to HDFS,{{cite web |title=Version 2.0 provides for manual failover and they are working on automatic failover |url=https://hadoop.apache.org/releases.html#23+May%2C+2012%3A+Release+2.0.0-alpha+available |access-date= 30 July 2013 |publisher=Hadoop.apache.org }} letting the main metadata server called the NameNode manually fail-over onto a backup. The project has also started developing automatic fail-overs.

The HDFS file system includes a so-called secondary namenode, a misleading term that some might incorrectly interpret as a backup namenode when the primary namenode goes offline. In fact, the secondary namenode regularly connects with the primary namenode and builds snapshots of the primary namenode's directory information, which the system then saves to local or remote directories. These checkpointed images can be used to restart a failed primary namenode without having to replay the entire journal of file-system actions, then to edit the log to create an up-to-date directory structure. Because the namenode is the single point for storage and management of metadata, it can become a bottleneck for supporting a huge number of files, especially a large number of small files. HDFS Federation, a new addition, aims to tackle this problem to a certain extent by allowing multiple namespaces served by separate namenodes. Moreover, there are some issues in HDFS such as small file issues, scalability problems, Single Point of Failure (SPoF), and bottlenecks in huge metadata requests.

One advantage of using HDFS is data awareness between the job tracker and task tracker. The job tracker schedules map or reduce jobs to task trackers with an awareness of the data location. For example: if node A contains data (a, b, c) and node X contains data (x, y, z), the job tracker schedules node A to perform map or reduce tasks on (a, b, c) and node X would be scheduled to perform map or reduce tasks on (x, y, z). This reduces the amount of traffic that goes over the network and prevents unnecessary data transfer. When Hadoop is used with other file systems, this advantage is not always available. This can have a significant impact on job-completion times as demonstrated with data-intensive jobs.{{cite web |url=http://www.eng.auburn.edu/~xqin/pubs/hcw10.pdf |title= Improving MapReduce performance through data placement in heterogeneous Hadoop Clusters |date=April 2010 |publisher=Eng.auburn.ed }}

HDFS was designed for mostly immutable files and may not be suitable for systems requiring concurrent write operations.

HDFS can be mounted directly with a Filesystem in Userspace (FUSE) virtual file system on Linux and some other Unix systems.

File access can be achieved through the native Java API, the Thrift API (generates a client in a number of languages e.g. C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, Smalltalk, and OCaml), the command-line interface, the HDFS-UI web application over HTTP, or via 3rd-party network client libraries.{{cite web |url=https://wiki.apache.org/hadoop/MountableHDFS |title=Mounting HDFS |access-date=2016-08-05 |archive-date=14 May 2014 |archive-url=https://web.archive.org/web/20140514220607/https://wiki.apache.org/hadoop/MountableHDFS |url-status=dead }}

HDFS is designed for portability across various hardware platforms and for compatibility with a variety of underlying operating systems. The HDFS design introduces portability limitations that result in some performance bottlenecks, since the Java implementation cannot use features that are exclusive to the platform on which HDFS is running.{{cite web |url=http://www.jeffshafer.com/publications/papers/shafer_ispass10.pdf |title=The Hadoop Distributed Filesystem: Balancing Portability and Performance |last1=Shafer |first1=Jeffrey |last2=Rixner |first2=Scott |last3=Cox |first3=Alan |publisher=Rice University| access-date=2016-09-19 }} Due to its widespread integration into enterprise-level infrastructure, monitoring HDFS performance at scale has become an increasingly important issue. Monitoring end-to-end performance requires tracking metrics from datanodes, namenodes, and the underlying operating system.{{cite web |url=https://www.datadoghq.com/blog/monitor-hadoop-metrics/#toc-hdfs-metrics2 |title=How to Collect Hadoop Performance Metrics |last1=Mouzakitis |first1=Evan| access-date=2016-10-24 |date=21 July 2016 }} There are currently several monitoring platforms to track HDFS performance, including Hortonworks, Cloudera, and Datadog.

==Other file systems==

Hadoop works directly with any distributed file system that can be mounted by the underlying operating system by simply using a file:// URL; however, this comes at a price – the loss of locality. To reduce network traffic, Hadoop needs to know which servers are closest to the data, information that Hadoop-specific file system bridges can provide.

In May 2011, the list of supported file systems bundled with Apache Hadoop were:

  • HDFS: Hadoop's own rack-aware file system.{{cite web |url=http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsUserGuide.html#Rack_Awareness |title=HDFS Users Guide – Rack Awareness |publisher=Hadoop.apache.org |access-date=2013-10-17 }} This is designed to scale to tens of petabytes of storage and runs on top of the file systems of the underlying operating systems.
  • Apache Hadoop Ozone: HDFS-compatible object store targeting optimized for billions of small files.
  • FTP file system: This stores all its data on remotely accessible FTP servers.
  • Amazon S3 (Amazon Simple Storage Service) object storage: This is targeted at clusters hosted on the Amazon Elastic Compute Cloud server-on-demand infrastructure. There is no rack-awareness in this file system, as it is all remote.
  • Windows Azure Storage Blobs (WASB) file system: This is an extension of HDFS that allows distributions of Hadoop to access data in Azure blob stores without moving the data permanently into the cluster.

A number of third-party file system bridges have also been written, none of which are currently in Hadoop distributions. However, some commercial distributions of Hadoop ship with an alternative file system as the default{{snd}}specifically IBM and MapR.

  • In 2009, IBM discussed running Hadoop over the IBM General Parallel File System.{{cite web |url=http://www.usenix.org/events/hotcloud09/tech/full_papers/ananthanarayanan.pdf |title= Cloud analytics: Do we really need to reinvent the storage stack? |date=June 2009 |publisher=IBM }} The source code was published in October 2009.{{cite web |url=https://issues.apache.org/jira/browse/HADOOP-6330 |title=HADOOP-6330: Integrating IBM General Parallel File System implementation of Hadoop Filesystem interface |date=2009-10-23 |publisher=IBM }}
  • In April 2010, Parascale published the source code to run Hadoop against the Parascale file system.{{cite web |url=https://issues.apache.org/jira/browse/HADOOP-6704 |title=HADOOP-6704: add support for Parascale filesystem |date=2010-04-14 |publisher=Parascale }}
  • In April 2010, Appistry released a Hadoop file system driver for use with its own CloudIQ Storage product.{{cite web |url=http://resources.appistry.com/news-and-events/press/06072010-appistry-cloudiq-storage-now-generally-available |title=HDFS with CloudIQ Storage |date=2010-07-06 |publisher=Appistry, Inc. |access-date=2013-12-10 |archive-url=https://web.archive.org/web/20140405044536/http://resources.appistry.com/news-and-events/press/06072010-appistry-cloudiq-storage-now-generally-available |archive-date=2014-04-05 |url-status=dead }}
  • In June 2010, HP discussed a location-aware IBRIX Fusion file system driver.{{cite web |url=http://www.slideshare.net/steve_l/high-availability-hadoop |title=High Availability Hadoop |date=2010-06-09 |publisher=HP }}
  • In May 2011, MapR Technologies Inc. announced the availability of an alternative file system for Hadoop, MapR FS, which replaced the HDFS file system with a full random-access read/write file system.

=JobTracker and TaskTracker: the MapReduce engine=

{{Main|MapReduce}}

Atop the file systems comes the MapReduce Engine, which consists of one JobTracker, to which client applications submit MapReduce jobs. The JobTracker pushes work to available TaskTracker nodes in the cluster, striving to keep the work as close to the data as possible. With a rack-aware file system, the JobTracker knows which node contains the data, and which other machines are nearby. If the work cannot be hosted on the actual node where the data resides, priority is given to nodes in the same rack. This reduces network traffic on the main backbone network. If a TaskTracker fails or times out, that part of the job is rescheduled. The TaskTracker on each node spawns a separate Java virtual machine (JVM) process to prevent the TaskTracker itself from failing if the running job crashes its JVM. A heartbeat is sent from the TaskTracker to the JobTracker every few minutes to check its status. The Job Tracker and TaskTracker status and information is exposed by Jetty and can be viewed from a web browser.

Known limitations of this approach are:

  1. The allocation of work to TaskTrackers is very simple. Every TaskTracker has a number of available slots (such as "4 slots"). Every active map or reduce task takes up one slot. The Job Tracker allocates work to the tracker nearest to the data with an available slot. There is no consideration of the current system load of the allocated machine, and hence its actual availability.
  2. If one TaskTracker is very slow, it can delay the entire MapReduce job{{snd}} especially towards the end, when everything can end up waiting for the slowest task. With speculative execution enabled, however, a single task can be executed on multiple slave nodes.

==Scheduling==

By default Hadoop uses FIFO scheduling, and optionally 5 scheduling priorities to schedule jobs from a work queue.{{cite web|url=https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/CommandsManual.html|title=Hadoop Commands Guide|date=2024-10-09 |access-date=2024-11-17 |archive-url=https://web.archive.org/web/20110817053520/http://hadoop.apache.org/common/docs/current/commands_manual.html#job|archive-date=17 August 2011}} In version 0.19 the job scheduler was refactored out of the JobTracker, while adding the ability to use an alternate scheduler (such as the Fair scheduler or the Capacity scheduler, described next).{{cite web |title=Refactor the scheduler out of the JobTracker |url=https://issues.apache.org/jira/browse/HADOOP-3412 |work=Hadoop Common |publisher=Apache Software Foundation |access-date=9 June 2012 }}

===Fair scheduler===

The fair scheduler was developed by Facebook.{{cite web |url=http://www.ibm.com/developerworks/library/os-hadoop-scheduling/ |title=Scheduling in Hadoop |first=M. Tim |last=Jones |date=6 December 2011 |website=ibm.com |publisher=IBM |access-date=20 November 2013 }} The goal of the fair scheduler is to provide fast response times for small jobs and Quality of service (QoS) for production jobs. The fair scheduler has three basic concepts.{{cite web|url=https://svn.apache.org/repos/asf/hadoop/common/branches/MAPREDUCE-233/src/contrib/fairscheduler/designdoc/fair_scheduler_design_doc.pdf|title=Hadoop Fair Scheduler Design Document|website=apache.org|access-date=12 October 2017}}

  1. Jobs are grouped into pools.
  2. Each pool is assigned a guaranteed minimum share.
  3. Excess capacity is split between jobs.

By default, jobs that are uncategorized go into a default pool. Pools have to specify the minimum number of map slots, reduce slots, as well as a limit on the number of running jobs.

===Capacity scheduler===

The capacity scheduler was developed by Yahoo. The capacity scheduler supports several features that are similar to those of the fair scheduler.{{cite web|url=http://hadoop.apache.org/docs/stable1/capacity_scheduler.html|title=CapacityScheduler Guide|website=Hadoop.apache.org|access-date=31 December 2015}}

  1. Queues are allocated a fraction of the total resource capacity.
  2. Free resources are allocated to queues beyond their total capacity.
  3. Within a queue, a job with a high level of priority has access to the queue's resources.

There is no preemption once a job is running.

=Difference between Hadoop 1 and Hadoop 2 (YARN)=

The biggest difference between Hadoop 1 and Hadoop 2 is the addition of YARN (Yet Another Resource Negotiator), which replaced the MapReduce engine in the first version of Hadoop.

YARN strives to allocate resources to various applications effectively. It runs two daemons, which take care of two different tasks: the resource manager, which does job tracking and resource allocation to applications, the application master, which monitors progress of the execution.

=Difference between Hadoop 2 and Hadoop 3=

There are important features provided by Hadoop 3. For example, while there is one single namenode in Hadoop 2, Hadoop 3, enables having multiple name nodes, which solves the single point of failure problem.

In Hadoop 3, there are containers working in principle of Docker, which reduces time spent on application development.

One of the biggest changes is that Hadoop 3 decreases storage overhead with erasure coding.

Also, Hadoop 3 permits usage of GPU hardware within the cluster, which is a very substantial benefit to execute deep learning algorithms on a Hadoop cluster.{{cite web |url=https://it.hortonworks.com/blog/hadoop-3-adds-value-hadoop-2/ |title=How Apache Hadoop 3 Adds Value Over Apache Hadoop 2 |website=hortonworks.com |access-date=2018-06-11 |date=7 February 2018 |archive-date=16 November 2018 |archive-url=https://web.archive.org/web/20181116054338/https://it.hortonworks.com/blog/hadoop-3-adds-value-hadoop-2/ |url-status=dead }}

=Other applications=

The HDFS is not restricted to MapReduce jobs. It can be used for other applications, many of which are under development at Apache. The list includes the HBase database, the Apache Mahout machine learning system, and the Apache Hive data warehouse. Theoretically, Hadoop could be used for any workload that is batch-oriented rather than real-time, is very data-intensive, and benefits from parallel processing. It can also be used to complement a real-time system, such as lambda architecture, Apache Storm, Flink, and Spark Streaming.{{cite book |chapter= Benchmarking Streaming Computation Engines: Storm, Flink and Spark Streaming |date=May 2016 |publisher=IEEE |doi=10.1109/IPDPSW.2016.138 |title=2016 IEEE International Parallel and Distributed Processing Symposium Workshops (IPDPSW) |pages=1789–1792 |last1=Chintapalli |first1=Sanket |last2=Dagit |first2=Derek |last3=Evans |first3=Bobby |last4=Farivar |first4=Reza |last5=Graves |first5=Thomas |last6=Holderbaugh |first6=Mark |last7=Liu |first7=Zhuo |last8=Nusbaum |first8=Kyle |last9=Patil |first9=Kishorkumar |last10=Peng |first10=Boyang Jerry |last11=Poulosky |first11=Paul |isbn=978-1-5090-3682-0 |s2cid=2180634 }}

Commercial applications of Hadoop include:{{cite web |date=10 October 2009 |url=http://www.dbms2.com/2009/10/10/enterprises-using-hadoo/ |title="How 30+ enterprises are using Hadoop", in DBMS2 |publisher=Dbms2.com |access-date=2013-10-17 }}

  • Log or clickstream analysis
  • Marketing analytics
  • Machine learning and data mining
  • Image processing
  • XML message processing
  • Web crawling
  • Archival work for compliance, including of relational and tabular data

Prominent use cases

On 19 February 2008, Yahoo! Inc. launched what they claimed was the world's largest Hadoop production application. The Yahoo! Search Webmap is a Hadoop application that runs on a Linux cluster with more than 10,000 cores and produced data that was used in every Yahoo! web search query.{{cite web|url=https://developer.yahoo.com/blogs/hadoop/yahoo-launches-world-largest-hadoop-production-application-398.html|title=Yahoo! Launches World's Largest Hadoop Production Application|date=19 February 2008|work=Yahoo|access-date=31 December 2015|archive-url=https://web.archive.org/web/20160307081144/https://developer.yahoo.com/blogs/hadoop/yahoo-launches-world-largest-hadoop-production-application-398.html|archive-date=7 March 2016|url-status=dead}} There are multiple Hadoop clusters at Yahoo! and no HDFS file systems or MapReduce jobs are split across multiple data centers. Every Hadoop cluster node bootstraps the Linux image, including the Hadoop distribution. Work that the clusters perform is known to include the index calculations for the Yahoo! search engine. In June 2009, Yahoo! made the source code of its Hadoop version available to the open-source community.{{cite web |url=http://developer.yahoo.com/hadoop/ |title=Hadoop and Distributed Computing at Yahoo! |publisher=Yahoo! |date=2011-04-20 |access-date=2013-10-17 }}

In 2010, Facebook claimed that they had the largest Hadoop cluster in the world with 21 PB of storage.{{cite web |url=http://hadoopblog.blogspot.com/2010/05/facebook-has-worlds-largest-hadoop.html |title=HDFS: Facebook has the world's largest Hadoop cluster! |publisher=Hadoopblog.blogspot.com |date=2010-05-09 |access-date=2012-05-23 }} In June 2012, they announced the data had grown to 100 PB{{cite web |url=http://www.facebook.com/notes/facebook-engineering/under-the-hood-hadoop-distributed-filesystem-reliability-with-namenode-and-avata/10150888759153920 |title=Under the Hood: Hadoop Distributed File system reliability with Namenode and Avatarnode |publisher=Facebook |access-date=2012-09-13 }} and later that year they announced that the data was growing by roughly half a PB per day.{{cite web |url=https://www.facebook.com/notes/facebook-engineering/under-the-hood-scheduling-mapreduce-jobs-more-efficiently-with-corona/10151142560538920 |title=Under the Hood: Scheduling MapReduce jobs more efficiently with Corona |publisher=Facebook |access-date=2012-11-09 }}

{{As of|2013}}, Hadoop adoption had become widespread: more than half of the Fortune 50 companies used Hadoop.{{cite press release |title=Altior's AltraSTAR – Hadoop Storage Accelerator and Optimizer Now Certified on CDH4 (Cloudera's Distribution Including Apache Hadoop Version 4) |url=http://www.prnewswire.com/news-releases/altiors-altrastar---hadoop-storage-accelerator-and-optimizer-now-certified-on-cdh4-clouderas-distribution-including-apache-hadoop-version-4-183906141.html |location=Eatontown, NJ |publisher=Altior Inc. |date=2012-12-18 |access-date=2013-10-30 }}

Hadoop hosting in the cloud

Hadoop can be deployed in a traditional onsite datacenter as well as in the cloud.{{cite web|url=http://azure.microsoft.com/en-us/solutions/hadoop/|title=Hadoop - Microsoft Azure|website=azure.microsoft.com|access-date=11 December 2017}} The cloud allows organizations to deploy Hadoop without the need to acquire hardware or specific setup expertise.{{cite web |url=http://azure.microsoft.com/en-us/solutions/hadoop/ |title=Hadoop |publisher=Azure.microsoft.com |access-date=2014-07-22 }}

Commercial support

A number of companies offer commercial implementations or support for Hadoop.{{cite web |url=http://gigaom.com/cloud/why-we-need-more-hadoop-innovation/ |title=Why the Pace of Hadoop Innovation Has to Pick Up |publisher=Gigaom.com |date=2011-04-25 |access-date=2013-10-17 }}

=Branding=

The Apache Software Foundation has stated that only software officially released by the Apache Hadoop Project can be called Apache Hadoop or Distributions of Apache Hadoop.{{cite web |url=http://wiki.apache.org/hadoop/Defining%20Hadoop |title=Defining Hadoop |publisher=Wiki.apache.org |date=2013-03-30 |access-date=2013-10-17 }} The naming of products and derivative works from other vendors and the term "compatible" are somewhat controversial within the Hadoop developer community.{{cite web |url=http://mail-archives.apache.org/mod_mbox/hadoop-general/201105.mbox/%3C4DC91392.2010308@apache.org%3E |title=Defining Hadoop Compatibility: revisited |publisher=Mail-archives.apache.org |date=2011-05-10 |access-date=2013-10-17 }}

Papers

Influential papers on the birth, growth, and curation of Hadoop and big data processing include:

Jeffrey Dean, Sanjay Ghemawat (2004) [https://www.usenix.org/legacy/publications/library/proceedings/osdi04/tech/full_papers/dean/dean_html/index.html MapReduce: Simplified Data Processing on Large Clusters], Google. This paper inspired Doug Cutting to develop an open-source implementation of the Map-Reduce framework. He named it Hadoop, after his son's toy elephant.

  • Michael Franklin, Alon Halevy, David Maier (2005) [http://www.eecs.berkeley.edu/~franklin/Papers/dataspaceSR.pdf From Databases to Dataspaces: A New Abstraction for Information Management]. The authors highlight the need for storage systems to accept all data formats and to provide APIs for data access that evolve based on the storage system's understanding of the data.
  • Fay Chang et al. (2006) [http://static.googleusercontent.com/external_content/untrusted_dlcp/research.google.com/en/us/archive/bigtable-osdi06.pdf Bigtable: A Distributed Storage System for Structured Data], Google.
  • Robert Kallman et al. (2008) [http://www.vldb.org/pvldb/vol1/1454211.pdf H-store: a high-performance, distributed main memory transaction processing system]

See also

{{Portal|Free and open-source software}}

References

{{Reflist}}

Bibliography

{{Refbegin}}

  • {{Cite book

| first1 = Chuck

| last1 = Lam

| date = 28 July 2010

| title = Hadoop in Action

| edition = 1st

| publisher = Manning Publications

| page = 325

| isbn = 978-1-935-18219-1

| url = https://books.google.com/books?id=iGq3PwAACAAJ

}}

  • {{Cite book

|first1 = Jason

|last1 = Venner

|date = 22 June 2009

|title = Pro Hadoop

|edition = 1st

|publisher = Apress

|page = 440

|isbn = 978-1-430-21942-2

|url = http://www.apress.com/book/view/1430219424

|access-date = 3 July 2009

|archive-url = https://web.archive.org/web/20101205204120/http://apress.com/book/view/1430219424

|archive-date = 5 December 2010

|url-status = dead

}}

  • {{Cite book

| first1 = Tom

| last1 = White

| date = 16 June 2009

| title = Hadoop: The Definitive Guide

| edition = 1st

| publisher = O'Reilly Media

| page = 524

| isbn = 978-0-596-52197-4

| url = http://oreilly.com/catalog/9780596521974

}}

  • {{Cite book

| first1 = Deepak

| last1 = Vohra

| date = October 2016

| title = Practical Hadoop Ecosystem: A Definitive Guide to Hadoop-Related Frameworks and Tools

| edition = 1st

| publisher = Apress

| page = 429

| isbn = 978-1-4842-2199-0

| url = https://www.apress.com/us/book/9781484221983

}}

  • {{cite book |last=Wiktorski |first=Tomasz |date=January 2019 |title=Data-intensive Systems |url=https://www.springer.com/it/book/9783030046026 |location=Cham, Switzerland |publisher=Springer |isbn=978-3-030-04603-3}}

{{Refend}}