Jump to content

Apache Hadoop

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 20.138.1.245 (talk) at 13:26, 17 May 2010 (Hadoop at Yahoo!). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Apache Hadoop
Developer(s)Apache Software Foundation
Stable release
0.20.2 / February 26, 2010 (2010-02-26)
Repository
Written inJava
Operating systemCross-platform
TypeDistributed File System
LicenseApache License 2.0
Websitehttp://hadoop.apache.org/

Apache Hadoop is a Java software framework that supports data-intensive distributed applications under a free license.[1] It enables applications to work with thousands of nodes and petabytes of data. Hadoop was inspired by Google's MapReduce and Google File System (GFS) papers.

Hadoop is a top-level Apache project, being built and used by a community of contributors from all over the world.[2] Yahoo! has been the largest contributor[3] to the project and uses Hadoop extensively across its businesses.[4]

Hadoop was created by Doug Cutting (now a Cloudera employee),[5] who named it after his son's stuffed elephant.[6] It was originally developed to support distribution for the Nutch search engine project.[7]

Architecture

Hadoop consists of the Hadoop Common, which provides access to the filesystems that Hadoop supports. "Rack awareness" is an optimization which takes into account the geographic clustering of servers; network traffic between servers in different geographic clusters is minimized.[8] As of June 2008, the list of supported filesystems includes:

  • HDFS: Hadoop's own rack-aware filesystem. This is designed to scale to petabytes of storage and runs on top of the filesystems of the underlying operating systems.
  • Amazon S3 filesystem. This is targeted at clusters hosted on the Amazon Elastic Compute Cloud server-on-demand infrastructure. There is no rack-awareness in this filesystem, as it is all remote.
  • CloudStore (previously Kosmos Distributed File System), which is rack-aware.
  • FTP Filesystem: this stores all its data on remotely accessible FTP servers.
  • Read-only HTTP and HTTPS file systems.

Hadoop Distributed File System

The HDFS filesystem stores large files (an ideal file size is a multiple of 64 MB[9]), across multiple machines. It achieves reliability by replicating the data across multiple hosts, and hence does not require RAID storage on hosts. With the default replication value, 3, data is stored on three nodes: two on the same rack, and one on a different rack.

The filesystem is built from a cluster of data nodes, each of which serves up blocks of data over the network using a block protocol specific to HDFS. They also serve the data over HTTP, allowing access to all content from a web browser or other client. Data nodes can talk to each other to rebalance data, to move copies around, and to keep the replication of data high.

A filesystem requires one unique server, the name node. This is a single point of failure for an HDFS installation. If the name node goes down, the filesystem is offline. When it comes back up, the name node must replay all outstanding operations. This replay process can take over half an hour for a big cluster.[10] The filesystem includes what is called a Secondary Namenode, which misleads some people into thinking that when the primary Namenode goes offline, the Secondary Namenode takes over. In fact, the Secondary Namenode regularly connects with the namenode and downloads a snapshot of the primary Namenode's directory information, which is then saved to a directory. This Secondary Namenode is used together with the edit log of the Primary Namenode to create an up-to-date directory structure.

Another limitation of HDFS is that it cannot be directly mounted by an existing operating system. Getting data into and out of the HDFS file system, an action that often needs to be performed before and after executing a job, can be inconvenient. A Filesystem in Userspace has been developed to address this problem, at least for Linux and some other Unix systems.

Replicating data three times is costly. To alleviate this cost, recent versions of HDFS have erasure coding support whereby multiple blocks of the same file are combined together to generate a parity block. HDFS creates parity blocks asynchronously and then decreases the replication factor of the file from 3 to 2. Studies have shown that this technique decreases the physical storage requirements from a factor of 3 to a factor of around 2.2.

Job Tracker and Task Tracker: the MapReduce engine

Above the file systems comes the MapReduce engine, which consists of one Job Tracker, to which client applications submit MapReduce jobs. The Job Tracker pushes work out to available Task Tracker nodes in the cluster, striving to keep the work as close to the data as possible. With a rack-aware filesystem, the Job Tracker 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 Task Tracker fails or times out, that part of the job is rescheduled. If the Job Tracker fails, all ongoing work is lost.

Hadoop version 0.21 adds some checkpointing to this process; the Job Tracker records what it is up to in the filesystem. When a Job Tracker starts up, it looks for any such data, so that it can restart work from where it left off. In earlier versions of Hadoop, all active work was lost when a Job Tracker restarted.

Known limitations of this approach are:

  • The allocation of work to task trackers is very simple. Every task tracker 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 active load of the allocated machine, and hence its actual availability.
  • If one task tracker is very slow, it can delay the entire MapReduce operation -especially towards the end of a job, where everything can end up waiting for a single slow task. With speculative-execution enabled, however, a single task can be executed on multiple slave nodes.

Other applications

The HDFS filesystem is not restricted to MapReduce jobs. It can be used for other applications, many of which are under way at Apache. The list includes the HBase database, the Apache Mahout machine learning system, and matrix operations. Hadoop can in theory be used for any sort of work that is batch-oriented rather than real-time, very data-intensive, and able to work on pieces of the data in parallel. As of October 2009, commercial applications of Hadoop[11] included:

  • Log and/or clickstream analysis of various kinds
  • Marketing analytics
  • Machine learning and/or sophisticated data mining
  • Image processing
  • Processing of XML messages
  • Web crawling and/or text processing
  • General archiving, including of relational/tabular data, e.g. for compliance

Prominent users

Hadoop at Yahoo!

On February 19, 2008, Yahoo! launched what it claimed was the world's largest Hadoop production application. The Yahoo! Search Webmap is a Hadoop application that runs on more than 10,000 core Linux cluster and produces data that is now used in every Yahoo! Web search query.[12]

There are multiple Hadoop clusters at Yahoo!, each occupying a single datacenter (or fraction thereof). No HDFS filesystems or MapReduce jobs are split across multiple datacenters; instead each datacenter has a separate filesystem and workload. The cluster servers run Linux, and are configured on boot using Kickstart. Every machine bootstraps the Linux image, including the Hadoop distribution. Cluster configuration is also aided through a program called ZooKeeper. Work that the clusters perform is known to include the index calculations for the Yahoo! search engine.

On June 10, 2009, Yahoo! released its own distribution of Hadoop. [13]

Other users

Besides Yahoo!, many other organizations are using Hadoop to run large distributed computations. Some of them include:[2]

Hadoop on Amazon EC2/S3 services

It is possible to run Hadoop on Amazon Elastic Compute Cloud (EC2) and Amazon Simple Storage Service (S3)[14]. As an example The New York Times used 100 Amazon EC2 instances and a Hadoop application to process 4TB of raw image TIFF data (stored in S3) into 11 million finished PDFs in the space of 24 hours at a computation cost of about $240 (not including bandwidth).[15]

There is support for the S3 filesystem in Hadoop distributions, and the Hadoop team generates EC2 machine images after every release. From a pure performance perspective, Hadoop on S3/EC2 is inefficient, as the S3 filesystem is remote and delays returning from every write operation until the data are guaranteed to not be lost. This removes the locality advantages of Hadoop, which schedules work near data to save on network load.

On April 2, 2009 Amazon announced the beta release of a new service called Amazon Elastic MapReduce which they describe as "a web service that enables businesses, researchers, data analysts, and developers to easily and cost-effectively process vast amounts of data. It utilizes a hosted Hadoop framework running on the web-scale infrastructure of Amazon Elastic Compute Cloud (Amazon EC2) and Amazon Simple Storage Service (Amazon S3)."[16]

Hadoop at Google and IBM

IBM and Google announced an initiative in 2007 to use Hadoop to support university courses in distributed computer programming.[17]

In 2008 this collaboration, the Academic Cloud Computing Initiative (ACCI), partnered with the National Science Foundation to provide grant funding to academic researchers interested in exploring large-data applications. This resulted in the creation of the Cluster Exploratory (CLuE) program. [18]

Hadoop with Sun Grid Engine

Hadoop can also be used in compute farms and high-performance computing environments. Integration with Sun Grid Engine was released, and running Hadoop on Sun Grid (Sun's on-demand utility computing service) is possible. [19] In the initial implementation of the integration, the CPU-time scheduler has no knowledge of the locality of the data. A key feature of the Hadoop Runtime, "do the work in the same server or rack as the data" is therefore lost.

During the Sun HPC Software Workshop '09, an improved integration with data-locality awareness was announced. [20]

Sun also has the Hadoop Live CD OpenSolaris project, which allows running a fully functional Hadoop cluster using a live CD.[21]

See also

  • Nutch - an effort to build an open source search engine based on Lucene and Hadoop. Also created by Doug Cutting.
  • HBase - BigTable-model database. Sub-project of Hadoop.
  • Hypertable - HBase alternative
  • MapReduce - Hadoop's fundamental data filtering algorithm
  • Apache Pig - Reporting query language for Hadoop
  • Apache Mahout - Machine Learning algorithms implement on Hadoop
  • Cloud computing
  • Big data

References

  1. ^ "Hadoop is a framework for running applications on large clusters of commodity hardware. The Hadoop framework transparently provides applications both reliability and data motion. Hadoop implements a computational paradigm named map/reduce, where the application is divided into many small fragments of work, each of which may be executed or reexecuted on any node in the cluster. In addition, it provides a distributed file system that stores data on the compute nodes, providing very high aggregate bandwidth across the cluster. Both map/reduce and the distributed file system are designed so that node failures are automatically handled by the framework." Hadoop Overview
  2. ^ a b Applications and organizations using Hadoop
  3. ^ Hadoop Credits Page
  4. ^ Yahoo! Launches World's Largest Hadoop Production Application
  5. ^ Hadoop creator goes to Cloudera
  6. ^ Ashlee Vance (2009-03-17). "Hadoop, a Free Software Program, Finds Uses Beyond Search". New York Times. Retrieved 2010-01-20.
  7. ^ "Hadoop contains the distributed computing platform that was formerly a part of Nutch. This includes the Hadoop Distributed Filesystem (HDFS) and an implementation of map/reduce." About Hadoop
  8. ^ http://hadoop.apache.org/core/docs/r0.17.2/hdfs_user_guide.html#Rack+Awareness
  9. ^ The Hadoop Distributed File System: Architecture and Design
  10. ^ Improve Namenode startup performance. "Default scenario for 20 million files with the max Java heap size set to 14GB : 40 minutes. Tuning various Java options such as young size, parallel garbage collection, initial Java heap size : 14 minutes"
  11. ^ http://www.dbms2.com/2009/10/10/enterprises-using-hadoo/ "How 30+ enterprises are using Hadoop", in DBMS2
  12. ^ Yahoo! Launches World's Largest Hadoop Production Application (Hadoop and Distributed Computing at Yahoo!)
  13. ^ Hadoop and Distributed Computing at Yahoo!
  14. ^ http://aws.typepad.com/aws/2008/02/taking-massive.html Running Hadoop on Amazon EC2/S3
  15. ^ Gottfrid, Derek (November 1, 2007). "Self-service, Prorated Super Computing Fun!". The New York Times. Retrieved May 4, 2010.
  16. ^ Amazon Elastic MapReduce Beta
  17. ^ Google Press Center: Google and IBM Announce University Initiative to Address Internet-Scale Computing Challenges
  18. ^ NSF, Google, IBM form CLuE
  19. ^ "Creating Hadoop pe under SGE". Sun Microsystems. 2008-01-16.
  20. ^ "HDFS-Aware Scheduling With Grid Engine". Sun Microsystems. 2009-09-10.
  21. ^ "OpenSolaris Project: Hadoop Live CD". Sun Microsystems. 2008-08-29.

Bibliography