B. RAMAMURTHY Big-data Computing 6/22/2016 Bina Ramamurthy 2011 1.

Slides:



Advertisements
Similar presentations
Introduction to cloud computing Jiaheng Lu Department of Computer Science Renmin University of China
Advertisements

 Open source software framework designed for storage and processing of large scale data on clusters of commodity hardware  Created by Doug Cutting and.
Mapreduce and Hadoop Introduce Mapreduce and Hadoop
MapReduce Online Created by: Rajesh Gadipuuri Modified by: Ying Lu.
G O O G L E F I L E S Y S T E M 陳 仕融 黃 振凱 林 佑恩 Z 1.
 Need for a new processing platform (BigData)  Origin of Hadoop  What is Hadoop & what it is not ?  Hadoop architecture  Hadoop components (Common/HDFS/MapReduce)
Lecture 6 – Google File System (GFS) CSE 490h – Introduction to Distributed Computing, Winter 2008 Except as otherwise noted, the content of this presentation.
The Google File System. Why? Google has lots of data –Cannot fit in traditional file system –Spans hundreds (thousands) of servers connected to (tens.
The Google File System.
MapReduce and Hadoop Distributed File System
Hadoop File System B. Ramamurthy 4/19/2017.
Based on the text by Jimmy Lin and Chris Dryer 8/16/2015CSE4/5871.
Google Distributed System and Hadoop Lakshmi Thyagarajan.
Take An Internal Look at Hadoop Hairong Kuang Grid Team, Yahoo! Inc
Hadoop Distributed File System by Swathi Vangala.
Hadoop, Hadoop, Hadoop!!! Jerome Mitchell Indiana University.
Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung Google∗
The Hadoop Distributed File System: Architecture and Design by Dhruba Borthakur Presented by Bryant Yao.
Advanced Topics: MapReduce ECE 454 Computer Systems Programming Topics: Reductions Implemented in Distributed Frameworks Distributed Key-Value Stores Hadoop.
1 The Google File System Reporter: You-Wei Zhang.
CSC 456 Operating Systems Seminar Presentation (11/13/2012) Leon Weingard, Liang Xin The Google File System.
The Hadoop Distributed File System
Introduction to Hadoop 趨勢科技研發實驗室. Copyright Trend Micro Inc. Outline Introduction to Hadoop project HDFS (Hadoop Distributed File System) overview.
Cloud Distributed Computing Environment Content of this lecture is primarily from the book “Hadoop, The Definite Guide 2/e)
Map Reduce for data-intensive computing (Some of the content is adapted from the original authors’ talk at OSDI 04)
CS525: Special Topics in DBs Large-Scale Data Management Hadoop/MapReduce Computing Paradigm Spring 2013 WPI, Mohamed Eltabakh 1.
MapReduce: Simplified Data Processing on Large Clusters Jeffrey Dean and Sanjay Ghemawat.
Presented by CH.Anusha.  Apache Hadoop framework  HDFS and MapReduce  Hadoop distributed file system  JobTracker and TaskTracker  Apache Hadoop NextGen.
B. RAMAMURTHY MapReduce and Hadoop Distributed File System 10/6/ Contact: Dr. Bina Ramamurthy CSE Department University at Buffalo (SUNY)
Hadoop/MapReduce Computing Paradigm 1 Shirish Agale.
Introduction to Hadoop and HDFS
f ACT s  Data intensive applications with Petabytes of data  Web pages billion web pages x 20KB = 400+ terabytes  One computer can read
Hadoop & Condor Dhruba Borthakur Project Lead, Hadoop Distributed File System Presented at the The Israeli Association of Grid Technologies.
The Hadoop Distributed File System (HDFS) is a distributed file system designed to run on commodity hardware. It has many similarities with existing distributed.
The Memory B. Ramamurthy C B. Ramamurthy1. Topics for discussion On chip memory On board memory System memory Off system/online storage/ secondary memory.
Grid Computing at Yahoo! Sameer Paranjpye Mahadev Konar Yahoo!
MapReduce and GFS. Introduction r To understand Google’s file system let us look at the sort of processing that needs to be done r We will look at MapReduce.
Presenters: Rezan Amiri Sahar Delroshan
Tutorial: Big Data Algorithms and Applications Under Hadoop KUNPENG ZHANG SIDDHARTHA BHATTACHARYYA
GFS. Google r Servers are a mix of commodity machines and machines specifically designed for Google m Not necessarily the fastest m Purchases are based.
HDFS (Hadoop Distributed File System) Taejoong Chung, MMLAB.
Presented by: Katie Woods and Jordan Howell. * Hadoop is a distributed computing platform written in Java. It incorporates features similar to those of.
Hadoop implementation of MapReduce computational model Ján Vaňo.
HADOOP DISTRIBUTED FILE SYSTEM HDFS Reliability Based on “The Hadoop Distributed File System” K. Shvachko et al., MSST 2010 Michael Tsitrin 26/05/13.
CS525: Big Data Analytics MapReduce Computing Paradigm & Apache Hadoop Open Source Fall 2013 Elke A. Rundensteiner 1.
 Introduction  Architecture NameNode, DataNodes, HDFS Client, CheckpointNode, BackupNode, Snapshots  File I/O Operations and Replica Management File.
Hadoop/MapReduce Computing Paradigm 1 CS525: Special Topics in DBs Large-Scale Data Management Presented By Kelly Technologies
The Storage B. Ramamurthy C B. Ramamurthy1. Topics for discussion On chip memory On board memory System memory Off system/online storage/ secondary memory.
{ Tanya Chaturvedi MBA(ISM) Hadoop is a software framework for distributed processing of large datasets across large clusters of computers.
Cloud Distributed Computing Environment Hadoop. Hadoop is an open-source software system that provides a distributed computing environment on cloud (data.
Distributed File System. Outline Basic Concepts Current project Hadoop Distributed File System Future work Reference.
The Google File System Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung Presenter: Chao-Han Tsai (Some slides adapted from the Google’s series lectures)
BIG DATA/ Hadoop Interview Questions.
Hadoop.
Introduction to Distributed Platforms
Slides modified from presentation by B. Ramamurthy
Introduction to MapReduce and Hadoop
Gregory Kesden, CSE-291 (Storage Systems) Fall 2017
Gregory Kesden, CSE-291 (Cloud Computing) Fall 2016
Software Engineering Introduction to Apache Hadoop Map Reduce
Large-scale Processing with MapReduce
Big-data Computing: Hadoop Distributed File System
The Basics of Apache Hadoop
Hadoop Technopoints.
The Memory B. Ramamurthy C B. Ramamurthy.
Cloud Programming Models
Lecture 16 (Intro to MapReduce and Hadoop)
Big-data Computing: Hadoop Distributed File System
Presentation transcript:

B. RAMAMURTHY Big-data Computing 6/22/2016 Bina Ramamurthy

Reference Apache Hadoop: Hadoop: The Definitive Guide, by Tom White, 2 nd edition, Oreilly’s, 2010 Dean, J. and Ghemawat, S MapReduce: simplified data processing on large clusters. Communication of ACM 51, 1 (Jan. 2008), MapReduce: simplified data processing on large clusters 6/22/ Bina Ramamurthy 2011

Background Problem space is experiencing explosion of data Solution space: emergence of multi-core, virtualization, cloud computing Inability of traditional file system to handle data deluge The Big-data Computing Model MapReduce Programming Model (Algorithm) Google File System; Hadoop Distributed File System (Data Structure) Microsoft Dryad ( Large scale Data-base processing model) 3 6/22/2016 Bina Ramamurthy 2011

Data Deluge: smallest to largest Bioinformatics data: from about 3.3 billion base pairs in a human genome to huge number of sequences of proteins and the analysis of their behaviors The internet: web logs, facebook, twitter, maps, blogs, etc.: Analyze … Financial applications: that analyses volumes of data for trends and other deeper knowledge Health Care: huge amount of patient data, drug and treatment data The universe: The Hubble ultra deep telescope shows 100s of galaxies each with billions of stars; 6/22/ Bina Ramamurthy 2011

Examples Computational models that focus on data: large scale and/or complex data Example1: web log fcrawler.looksmart.com - - [26/Apr/2000:00:00: ] "GET /contacts.html HTTP/1.0" "-" "FAST-WebCrawler/2.1-pre2 fcrawler.looksmart.com - - [26/Apr/2000:00:17: ] "GET /news/news.html HTTP/1.0" "-" "FAST-WebCrawler/2.1-pre2 ppp931.on.bellglobal.com - - [26/Apr/2000:00:16: ] "GET /download/windows/asctab31.zip HTTP/1.0" " "Mozilla/4.7 [en]C-SYMPA (Win95; U)" [26/Apr/2000:00:23: ] "GET /pics/wpaper.gif HTTP/1.0" " "Mozilla/4.05 (Macintosh; I; PPC)" [26/Apr/2000:00:23: ] "GET /asctortf/ HTTP/1.0" " "Mozilla/4.05 (Macintosh; I; PPC)" [26/Apr/2000:00:23: ] "GET /pics/5star2000.gif HTTP/1.0" " "Mozilla/4.05 (Macintosh; I; PPC)" [26/Apr/2000:00:23: ] "GET /pics/5star.gif HTTP/1.0" " "Mozilla/4.05 (Macintosh; I; PPC)" [26/Apr/2000:00:23: ] "GET /pics/a2hlogo.jpg HTTP/1.0" " "Mozilla/4.05 (Macintosh; I; PPC)" [26/Apr/2000:00:23: ] "GET /cgi-bin/newcount?jafsof3&width=4&font=digital&noshow HTTP/1.0" " "Mozilla/4.05 (Macintosh; I; PPC)" Example 2: Climate/weather data modeling 6/22/ Bina Ramamurthy 2011

Problem Space 6 Data scale Compute scale Payroll KiloMegaGigaTera MFLOPS GFLOPS TFLOPS PFLOPS Peta Digital Signal Processing Weblog Mining Business Analytics Realtime Systems Massively Multiplayer Online game (MMOG) Other variables: Communication Bandwidth, ? Exa 6/22/2016 Bina Ramamurthy 2011

Top Ten Largest Databases 02/28/097 Ref: 6/22/ Bina Ramamurthy 2011

Processing Granularity Pipelined Instruction level Concurrent Thread level Service Object level Indexed File level Mega Block level Virtual System Level Data size: small Data size: large 8 6/22/2016 Bina Ramamurthy 2011

Traditional Storage Solutions 9 6/22/2016 Bina Ramamurthy 2011

Solution Space 10 6/22/2016 Bina Ramamurthy 2011

Google File System Internet introduced a new challenge in the form web logs, web crawler’s data: large scale “peta scale” But observe that this type of data has an uniquely different characteristic than your transactional or the “customer order” data : “write once read many (WORM)” ; Privacy protected healthcare and patient information; Historical financial data; Other historical data Google exploited this characteristics in its Google file system (GFS) 11 6/22/2016 Bina Ramamurthy 2011

Data Characteristics Streaming data access Applications need streaming access to data Batch processing rather than interactive user access. Large data sets and files: gigabytes, terabytes, petabytes, exabytes size High aggregate data bandwidth Scale to hundreds of nodes in a cluster Tens of millions of files in a single instance Write-once-read-many: a file once created, written and closed need not be changed – this assumption simplifies coherency WORM inspired a new programming model called the MapReduce programming model Multiple-readers can work on the read-only data concurrently 6/22/ Bina Ramamurthy 2011

The Context: Big-data Data mining huge amounts of data collected in a wide range of domains from astronomy to healthcare has become essential for planning and performance. We are in a knowledge economy.  Data is an important asset to any organization  Discovery of knowledge; Enabling discovery; annotation of data  Complex computational models  No single environment is good enough: need elastic, on-demand capacities We are looking at newer  programming models, and  Supporting algorithms and data structures. 6/22/ Bina Ramamurthy 2011

What is Hadoop? At Google MapReduce operation are run on a special file system called Google File System (GFS) that is highly optimized for this purpose. GFS is not open source. Doug Cutting and others at Yahoo! reverse engineered the GFS and called it Hadoop Distributed File System (HDFS). The software framework that supports HDFS, MapReduce and other related entities is called the project Hadoop or simply Hadoop. This is open source and distributed by Apache. 6/23/ Bina Ramamurthy 2010

Hadoop Projects Nutch and Lucene were started with “search” as the application in mind; Hadoop Distributed file system and mapreduce were found to have applications beyond search. HDFS and MapReduce were moved out of Nutch as a sub-project of Lucene and later promoted into a apache project Hadoop Lets look at HDFS and MapReduce 6/22/2016 Bina Ramamurthy

Basic Features: HDFS Highly fault-tolerant High throughput Suitable for applications with large data sets Streaming access to file system data Can be built out of commodity hardware HDFS provides Java API for applications to use.Java API A HTTP browser can be used to browse the files of a HDFS instance. 6/23/ Bina Ramamurthy 2010

Fault tolerance Failure is the norm rather than exception A HDFS instance may consist of thousands of server machines, each storing part of the file system’s data. Since we have huge number of components and that each component has non-trivial probability of failure means that there is always some component that is non-functional. Detection of faults and quick, automatic recovery from them is a core architectural goal of HDFS. 6/23/ Bina Ramamurthy 2010

Data Characteristics Streaming data access Applications need streaming access to data Batch processing rather than interactive user access. Large data sets and files: gigabytes to terabytes size High aggregate data bandwidth Scale to hundreds of nodes in a cluster Tens of millions of files in a single instance Write-once-read-many: a file once created, written and closed need not be changed – this assumption simplifies coherency A map-reduce application or web-crawler application fits perfectly with this model. 6/22/ Bina Ramamurthy 2011

Namenode and Datanodes Master/slave architecture HDFS cluster consists of a single Namenode, a master server that manages the file system namespace and regulates access to files by clients. There are a number of DataNodes usually one per node in a cluster. The DataNodes manage storage attached to the nodes that they run on. HDFS exposes a file system namespace and allows user data to be stored in files. A file is split into one or more blocks and set of blocks are stored in DataNodes. DataNodes: serves read, write requests, performs block creation, deletion, and replication upon instruction from Namenode. 6/23/ Bina Ramamurthy 2010

HDFS Architecture 6/23/ Namenode B replication Rack1 Rack2 Client Blocks Datanodes Client Write Read Metadata ops Metadata(Name, replicas..) (/home/foo/data,6... Block ops Bina Ramamurthy 2010

Hadoop Distributed File System 6/23/ Application Local file system Master node Name Nodes HDFS Client HDFS Server Block size: 2K Block size: 128M Replicated Bina Ramamurthy 2010

Architecture 6/22/ Bina Ramamurthy 2011

Namenode and Datanodes Master/slave architecture HDFS cluster consists of a single Namenode, a master server that manages the file system namespace and regulates access to files by clients. There are a number of DataNodes usually one per node in a cluster. The DataNodes manage storage attached to the nodes that they run on. HDFS exposes a file system namespace and allows user data to be stored in files. A file is split into one or more blocks and set of blocks are stored in DataNodes. DataNodes: serves read, write requests, performs block creation, deletion, and replication upon instruction from Namenode. 6/22/ Bina Ramamurthy 2011

HDFS Architecture 6/22/ Namenode B replication Rack1 Rack2 Client Blocks Datanodes Client Write Read Metadata ops Metadata(Name, replicas..) (/home/foo/data,6... Block ops Bina Ramamurthy 2011

File system Namespace 6/22/ Hierarchical file system with directories and files Create, remove, move, rename etc. Namenode maintains the file system Any meta information changes to the file system recorded by the Namenode. An application can specify the number of replicas of the file needed: replication factor of the file. This information is stored in the Namenode. Bina Ramamurthy 2011

Data Replication 6/22/ HDFS is designed to store very large files across machines in a large cluster. Each file is a sequence of blocks. All blocks in the file except the last are of the same size. Blocks are replicated for fault tolerance. Block size and replicas are configurable per file. The Namenode receives a Heartbeat and a BlockReport from each DataNode in the cluster. BlockReport contains all the blocks on a Datanode. Bina Ramamurthy 2011

Replica Placement 6/22/ The placement of the replicas is critical to HDFS reliability and performance. Optimizing replica placement distinguishes HDFS from other distributed file systems. Rack-aware replica placement:  Goal: improve reliability, availability and network bandwidth utilization Many racks, communication between racks are through switches. Network bandwidth between machines on the same rack is greater than those in different racks. Namenode determines the rack id for each DataNode. Replicas are typically placed on unique racks  Simple but non-optimal  Writes are expensive  Replication factor is 3 Replicas are placed: one on a node in a local rack, one on a different node in the local rack and one on a node in a different rack. 1/3 of the replica on a node, 2/3 on a rack and 1/3 distributed evenly across remaining racks. Bina Ramamurthy 2011

Replica Selection 6/22/ Replica selection for READ operation: HDFS tries to minimize the bandwidth consumption and latency. If there is a replica on the Reader node then that is preferred. HDFS cluster may span multiple data centers: replica in the local data center is preferred over the remote one. Bina Ramamurthy 2011

Safemode Startup 6/22/ On startup Namenode enters Safemode. Replication of data blocks do not occur in Safemode. Each DataNode checks in with Heartbeat and BlockReport. Namenode verifies that each block has acceptable number of replicas After a configurable percentage of safely replicated blocks check in with the Namenode, Namenode exits Safemode. It then makes the list of blocks that need to be replicated. Namenode then proceeds to replicate these blocks to other Datanodes. Bina Ramamurthy 2011

Filesystem Metadata 6/22/ The HDFS namespace is stored by Namenode. Namenode uses a transaction log called the EditLog to record every change that occurs to the filesystem meta data.  For example, creating a new file.  Change replication factor of a file  EditLog is stored in the Namenode’s local filesystem Entire filesystem namespace including mapping of blocks to files and file system properties is stored in a file FsImage. Stored in Namenode’s local filesystem. Bina Ramamurthy 2011

Namenode 6/22/ Keeps image of entire file system namespace and file Blockmap in memory. 4GB of local RAM is sufficient to support the above data structures that represent the huge number of files and directories. When the Namenode starts up it gets the FsImage and Editlog from its local file system, update FsImage with EditLog information and then stores a copy of the FsImage on the filesytstem as a checkpoint. Periodic checkpointing is done. So that the system can recover back to the last checkpointed state in case of a crash. Bina Ramamurthy 2011

Datanode 6/22/ A Datanode stores data in files in its local file system. Datanode has no knowledge about HDFS filesystem It stores each block of HDFS data in a separate file. Datanode does not create all files in the same directory. It uses heuristics to determine optimal number of files per directory and creates directories appropriately: When the filesystem starts up it generates a list of all HDFS blocks and send this report to Namenode: Blockreport. Bina Ramamurthy 2011

Protocol 6/22/ Bina Ramamurthy 2011

The Communication Protocol 6/22/ All HDFS communication protocols are layered on top of the TCP/IP protocol A client establishes a connection to a configurable TCP port on the Namenode machine. It talks ClientProtocol with the Namenode. The Datanodes talk to the Namenode using Datanode protocol. RPC abstraction wraps both ClientProtocol and Datanode protocol. Namenode is simply a server and never initiates a request; it only responds to RPC requests issued by DataNodes or clients. Bina Ramamurthy 2011

Robustness 6/22/ Bina Ramamurthy 2011

Possible Failures Primary objective of HDFS is to store data reliably in the presence of failures. Three common failures are: Namenode failure, Datanode failure and network partition. 6/22/ Bina Ramamurthy 2011

DataNode failure and heartbeat A network partition can cause a subset of Datanodes to lose connectivity with the Namenode. Namenode detects this condition by the absence of a Heartbeat message. Namenode marks Datanodes without Hearbeat and does not send any IO requests to them. Any data registered to the failed Datanode is not available to the HDFS. Also the death of a Datanode may cause replication factor of some of the blocks to fall below their specified value. 6/22/ Bina Ramamurthy 2011

Re-replication The necessity for re-replication may arise due to:  A Datanode may become unavailable,  A replica may become corrupted,  A hard disk on a Datanode may fail, or  The replication factor on the block may be increased. 6/22/ Bina Ramamurthy 2011

Cluster Rebalancing HDFS architecture is compatible with data rebalancing schemes. A scheme might move data from one Datanode to another if the free space on a Datanode falls below a certain threshold. In the event of a sudden high demand for a particular file, a scheme might dynamically create additional replicas and rebalance other data in the cluster. These types of data rebalancing are not yet implemented: research issue. 6/22/ Bina Ramamurthy 2011

Data Integrity Consider a situation: a block of data fetched from Datanode arrives corrupted. This corruption may occur because of faults in a storage device, network faults, or buggy software. A HDFS client creates the checksum of every block of its file and stores it in hidden files in the HDFS namespace. When a clients retrieves the contents of file, it verifies that the corresponding checksums match. If does not match, the client can retrieve the block from a replica. 6/22/ Bina Ramamurthy 2011

Metadata Disk Failure FsImage and EditLog are central data structures of HDFS. A corruption of these files can cause a HDFS instance to be non-functional. For this reason, a Namenode can be configured to maintain multiple copies of the FsImage and EditLog. Multiple copies of the FsImage and EditLog files are updated synchronously. Meta-data is not data-intensive. The Namenode could be single point failure: automatic failover has been recently added with a backup namenode. 6/22/ Bina Ramamurthy 2011

Data Organization 6/22/ Bina Ramamurthy 2011

Data Blocks HDFS support write-once-read-many with reads at streaming speeds. A typical block size is 64MB (or even 128 MB). A file is chopped into 64MB chunks and stored. 6/22/ Bina Ramamurthy 2011

Staging A client request to create a file does not reach Namenode immediately. HDFS client caches the data into a temporary file. When the data reached a HDFS block size the client contacts the Namenode. Namenode inserts the filename into its hierarchy and allocates a data block for it. The Namenode responds to the client with the identity of the Datanode and the destination of the replicas (Datanodes) for the block. Then the client flushes it from its local memory. 6/22/ Bina Ramamurthy 2011

Staging (contd.) The client sends a message that the file is closed. Namenode proceeds to commit the file for creation operation into the persistent store. If the Namenode dies before file is closed, the file is lost. This client side caching is required to avoid network congestion; also it has precedence is AFS (Andrew file system). 6/22/ Bina Ramamurthy 2011

Replication Pipelining When the client receives response from Namenode, it flushes its block in small pieces (4K) to the first replica, that in turn copies it to the next replica and so on. Thus data is pipelined from Datanode to the next. 6/22/ Bina Ramamurthy 2011

API (Accessibility) 6/22/ Bina Ramamurthy 2011

Application Programming Interface HDFS provides Java API for application to use.Java API Python access is also used in many applications. Python A C language wrapper for Java API is also available. A HTTP browser can be used to browse the files of a HDFS instance. 6/22/ Bina Ramamurthy 2011

FS Shell, Admin and Browser Interface HDFS organizes its data in files and directories. It provides a command line interface called the FS shell that lets the user interact with data in the HDFS. The syntax of the commands is similar to bash and csh. Example: to create a directory /foodir /bin/hadoop dfs –mkdir /foodir There is also DFSAdmin interface available Browser interface is also available to view the namespace. 6/22/ Bina Ramamurthy 2011

Space Reclamation When a file is deleted by a client, HDFS renames file to a file in be the /trash directory for a configurable amount of time. A client can request for an undelete in this allowed time. After the specified time the file is deleted and the space is reclaimed. When the replication factor is reduced, the Namenode selects excess replicas that can be deleted. Next heartbeat transfers this information to the Datanode that clears the blocks for use. 6/22/ Bina Ramamurthy 2011

MapReduce Engine 6/22/ Bina Ramamurthy 2011

What is MapReduce? MapReduce is a programming model Google has used successfully is processing its “big-data” sets (~ peta bytes per day)  A map function extracts some intelligence from raw data.  A reduce function aggregates according to some guides the data output by the map.  Users specify the computation in terms of a map and a reduce function,  Underlying runtime system automatically parallelizes the computation across large-scale clusters of machines, and  Underlying system also handles machine failures, efficient communications, and performance issues. -- Reference: Dean, J. and Ghemawat, S MapReduce: simplified data processing on large clusters. Communication of ACM 51, 1 (Jan. 2008), MapReduce: simplified data processing on large clusters 6/23/ Bina Ramamurthy 2010

Classes of problems “mapreducable” Benchmark for comparing: Jim Gray’s challenge on data- intensive computing. Ex: “Sort” Google uses it for wordcount, adwords, pagerank, indexing data. Simple algorithms such as grep, text-indexing, reverse indexing Bayesian classification: data mining domain Facebook uses it for various operations: demographics Financial services use it for analytics Astronomy: Gaussian analysis for locating extra-terrestrial objects. Expected to play a critical role in semantic web and web3.0 6/23/ Bina Ramamurthy 2010

Dogs Cats Snakes Fish (Pet database size: TByte) map split combine reduce part0 part1 part2 MapReduce Example in my Operating System Class 6/23/ Bina Ramamurthy 2010

Count Large scale data splits Parse-hash Map pair Reducers (say, Count) P-0000 P-0001 P-0002, count1, count2,count3 6/23/ Bina Ramamurthy 2010

MapReduce Engine MapReduce requires a distributed file system and an engine that can distribute, coordinate, monitor and gather the results. Hadoop provides that engine through (the file system we discussed earlier) and the JobTracker + TaskTracker system. JobTracker is simply a scheduler. TaskTracker is assigned a Map or Reduce (or other operations); Map or Reduce run on node and so is the TaskTracker; each task is run on its own JVM on a node. 6/22/ Bina Ramamurthy 2011

Job Tracker Is a service with Hadoop system It is like a scheduler Client application is sent to the JobTracker It talks to the Namenode, locates the TaskTracker near the data (remember the data has been populated already). JobTracker moves the work to the chosen TaskTracker node. TaskTracker monitors the execution of the task and updates the JobTracker through heartbeat. Any failure of a task is detected through missing heartbeat. Intermediate merging on the nodes are also taken care of by the JobTracker 6/22/ Bina Ramamurthy 2011

TaskTracker It accepts tasks (Map, Reduce, Shuffle, etc.) from JobTracker Each TaskTracker has a number of slots for the tasks; these are execution slots available on the machine or machines on the same rack; It spawns a sepearte JVM for execution of the tasks; It indicates the number of available slots through the hearbeat message to the JobTracker 6/22/ Bina Ramamurthy 2011

MapReduce Example: Mapper This is a cat Cat sits on a roof > > The roof is a tin roof There is a tin can on the roof > > > > > Cat kicks the can It rolls on the roof and falls on the next roof > > > The cat rolls too It sits on the can > 6/22/2016 Bina Ramamurthy

MapReduce Example: Combiner, Reducer > > > > > > > > > > > Combine the counts of all the same words: > … Reduce (sum in this case) the counts: 6/22/2016 Bina Ramamurthy

Summary We discussed the features of the Hadoop File System, a peta-scale file system to handle big-data sets. We discussed: Architecture, Protocol, API, etc. Also MapReduce Engine, Application Architecture Next task is to understand mapreduce and implement a simple mapreduce job on HDFS 6/22/ Bina Ramamurthy 2011