Apache Hadoop ( / 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. It has since also found use on clusters of higher-end hardware. 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.
55-400: 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 , where nodes manipulate
110-608: 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. HDFS
165-489: A data store due to its lack of POSIX compliance, but it does provide shell commands and Java application programming interface (API) methods that are similar to other file systems. 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: Top three are Master Services/Daemons/Nodes and bottom two are Slave Services. Master Services can communicate with each other and in
220-514: 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
275-639: A JAR file, along with any libraries the program uses. Executable JAR files have the manifest specifying the entry point class with Main-Class: myPrograms.MyClass and an explicit Class-Path (and the -cp argument is ignored). Some operating systems can run these directly when clicked. The typical invocation is java -jar foo.jar from a command line. Native launchers can be created on most platforms. For instance, Microsoft Windows users who prefer having Windows EXE files can use tools such as JSmooth, Launch4J, WinRun4J or Nullsoft Scriptable Install System to wrap single JAR files into executables. A manifest file
330-486: A Java-specific manifest file . They are built on the ZIP format and typically have a .jar file extension . A JAR file allows Java runtimes to efficiently deploy an entire application, including its classes and their associated resources, in a single request. JAR file elements may be compressed, shortening download times. A JAR file may contain a manifest file, that is located at META-INF/MANIFEST.MF . The entries in
385-521: A Sealed header, such as: The Name header's value is the package's relative pathname. Note that it ends with a '/' to distinguish it from a filename. Any headers following a Name header, without any intervening blank lines, apply to the file or package specified in the Name header. In the above example, because the Sealed header occurs after the Name: myCompany/myPackage header with no intervening blank lines,
440-479: 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
495-460: 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. The capacity scheduler was developed by Yahoo. The capacity scheduler supports several features that are similar to those of the fair scheduler. There is no preemption once a job is running. The biggest difference between Hadoop 1 and Hadoop 2 is the addition of YARN (Yet Another Resource Negotiator), which replaced
550-402: 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
605-587: 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. The Hadoop distributed file system (HDFS) is a distributed, scalable, and portable file system written in Java for the Hadoop framework. Some consider it to instead be
SECTION 10
#1732779764024660-416: Is a metadata file contained within a JAR. It defines extension and package-related data. It contains name–value pairs organized in sections. If a JAR file is intended to be used as an executable file, the manifest file specifies the main class of the application. The manifest file is named MANIFEST.MF . The manifest directory has to be the first entry of the compressed archive. The manifest appears at
715-468: 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. 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
770-410: 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. 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
825-425: 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 . Commercial applications of Hadoop include: On 19 February 2008, Yahoo! Inc. launched what they claimed was the world's largest Hadoop production application. The Yahoo! Search Webmap
880-409: 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
935-582: 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. 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
990-486: Is mostly written in the Java programming language , with some native code in C and command line utilities written as shell scripts . Though MapReduce Java code is common, any programming language can be used with Hadoop Streaming to implement the map and reduce parts of the user's program. Other projects in the Hadoop ecosystem expose richer user interfaces. According to its co-founders, Doug Cutting and Mike Cafarella ,
1045-406: 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
1100-447: 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,
1155-511: The Sealed header applies (only) to the package myCompany/myPackage . The feature of sealed packages is outmoded by the Java Platform Module System introduced in Java 9, in which modules cannot split packages. Several manifest headers hold versioning information. One set of headers can be assigned to each package. The versioning headers appear directly beneath the Name header for the package. This example shows all
SECTION 20
#17327797640241210-620: The Hadoop Common package, which provides file system and operating system level abstractions, a MapReduce engine (either MapReduce/MR1 or YARN/MR2) 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
1265-517: 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. 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,
1320-513: The canonical location META-INF/MANIFEST.MF . There can be only one manifest file in an archive and it must be at that location. The content of the manifest file in a JAR file created with version 1.0 of the Java Development Kit is the following. The name is separated from its value by a colon. The default manifest shows that it conforms to version 1.0 of the manifest specification. The manifest can contain information about
1375-459: The ecosystem , 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 . Apache Hadoop's MapReduce and HDFS components were inspired by Google papers on MapReduce and Google File System . The Hadoop framework itself
1430-653: The Fortune 50 companies used Hadoop. Hadoop can be deployed in a traditional onsite datacenter as well as in the cloud . The cloud allows organizations to deploy Hadoop without the need to acquire hardware or specific setup expertise. A number of companies offer commercial implementations or support for Hadoop. JAR (file format) A JAR ("Java archive") file is a package file format typically used to aggregate many Java class files and associated metadata and resources (text, images, etc.) into one file for distribution. JAR files are archive files that include
1485-587: The JobTracker, while adding the ability to use an alternate scheduler (such as the Fair scheduler or the Capacity scheduler , described next). The fair scheduler was developed by Facebook . 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. By default, jobs that are uncategorized go into
1540-477: 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. There are important features provided by Hadoop 3. For example, while there
1595-464: 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: By default Hadoop uses FIFO scheduling, and optionally 5 scheduling priorities to schedule jobs from a work queue. In version 0.19 the job scheduler was refactored out of
1650-409: 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
1705-434: 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. HDFS was designed for mostly immutable files and may not be suitable for systems requiring concurrent write operations. HDFS can be mounted directly with
Apache Hadoop - Misplaced Pages Continue
1760-483: The classes that must be loaded for an application to be able to run. Note that Class-Path entries are delimited with spaces, not with the system path delimiter: The Apache Ant build tool has its own package to read and write Zip and JAR archives, including support for Unix filesystem extensions. The org.apache.tools.zip package is released under the Apache Software Foundation license and
1815-596: The cluster, which is a very substantial benefit to execute deep learning algorithms on a Hadoop cluster. 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
1870-537: 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. Hadoop cluster has nominally
1925-432: 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. The base Apache Hadoop framework is composed of the following modules: The term Hadoop is often used for both base modules and sub-modules and also
1980-402: The data will remain available. 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. Hadoop requires
2035-435: 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: 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 – specifically IBM and MapR . Atop
2090-430: 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
2145-484: The embedded manifest file. The JAR itself is not signed, but instead every file inside the archive is listed along with its checksum; it is these checksums that are signed. Multiple entities may sign the JAR file, changing the JAR file itself with each signing, although the signed files themselves remain valid. When the Java runtime loads signed JAR files, it can validate the signatures and refuse to load classes that do not match
2200-486: 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
2255-427: The general form: In this example com.example.MyClassName.main() executes at application launch. Optionally, a package within a JAR file can be sealed, which means that all classes defined in that package are archived in the same JAR file. A package might be sealed to ensure version consistency among the classes in the software or as a security measure. To seal a package, a Name entry needs to appear, followed by
Apache Hadoop - Misplaced Pages Continue
2310-676: The genesis of Hadoop was the Google File System paper that was published in October 2003. This paper spawned another one from Google – "MapReduce: Simplified Data Processing on Large Clusters". Development started on the Apache Nutch project, but was moved to the new Hadoop subproject in January 2006. Doug Cutting, who was working at Yahoo! at the time, named it after his son's toy elephant. The initial code that
2365-535: 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. In 2010, Facebook claimed that they had the largest Hadoop cluster in the world with 21 PB of storage. In June 2012, they announced the data had grown to 100 PB and later that year they announced that the data was growing by roughly half a PB per day. As of 2013, Hadoop adoption had become widespread: more than half of
2420-426: 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
2475-552: The manifest file describe how to use the JAR file. For instance, a Classpath entry can be used to specify other JAR files to load with the JAR. The contents of a file may be extracted using any archive extraction software that supports the ZIP format, or the jar command line utility provided by the Java Development Kit. Developers can digitally sign JAR files. In that case, the signature information becomes part of
2530-497: The manifest file. The manifest allows developers to define several useful features for their jars. Properties are specified in key-value pairs. If an application is contained in a JAR file, the Java Virtual Machine needs to know the application's entry point. An entry point is any class with a public static void main(String[] args) method. This information is provided in the manifest Main-Class header, which has
2585-600: The other files that are packaged in the archive. Manifest contents depend on the intended use for the JAR file. The default manifest file makes no assumptions about what information it should record about other files, so its single line contains data only about itself. It should be encoded in UTF-8. JAR files created only for the purpose of archiving do not use the MANIFEST.MF file. Most uses of JAR files go beyond simple archiving and compression and require special information in
2640-409: 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
2695-408: The range of gigabytes to terabytes) 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
2750-537: 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. In May 2012, high-availability capabilities were added to HDFS, letting
2805-461: 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
SECTION 50
#17327797640242860-523: The signature. It can also support 'sealed' packages, in which the Classloader will only permit Java classes to be loaded into the same package if they are all signed by the same entities. This prevents malicious code from being inserted into an existing package, and so gaining access to package-scoped classes and data. The content of JAR files may be obfuscated to make reverse engineering more difficult. An executable Java program can be packaged in
2915-439: The underlying operating system. There are currently several monitoring platforms to track HDFS performance, including Hortonworks , Cloudera , and Datadog . 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
2970-435: The versioning headers: A jar can be optionally marked as a multi-release jar. Using the multi-release feature allows library developers to load different code depending on the version of the Java runtime. This in turn allows developers to leverage new features without sacrificing compatibility. A multi-release jar is enabled using the following declaration in the manifest: The MANIFEST.MF file can be used to specify all
3025-589: 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; Hadoop 0.1.0 was released in April 2006. It continues to evolve through contributions that are being made to the project. The first design document for the Hadoop Distributed File System was written by Dhruba Borthakur in 2007. Hadoop consists of
#23976