1 The Map-Reduce Framework Compiled by Mark Silberstein, using slides from Dan Weld’s class at U. Washington, Yaniv Carmeli and some other.

Slides:



Advertisements
Similar presentations
Lecture 12: MapReduce: Simplified Data Processing on Large Clusters Xiaowei Yang (Duke University)
Advertisements

MAP REDUCE PROGRAMMING Dr G Sudha Sadasivam. Map - reduce sort/merge based distributed processing Best for batch- oriented processing Sort/merge is primitive.
MapReduce: Simplified Data Processing on Large Clusters These are slides from Dan Weld’s class at U. Washington (who in turn made his slides based on those.
These are slides with a history. I found them on the web... They are apparently based on Dan Weld’s class at U. Washington, (who in turn based his slides.
Distributed Computations
MapReduce: Simplified Data Processing on Large Clusters Cloud Computing Seminar SEECS, NUST By Dr. Zahid Anwar.
CS 345A Data Mining MapReduce. Single-node architecture Memory Disk CPU Machine Learning, Statistics “Classical” Data Mining.
Map Reduce Allan Jefferson Armando Gonçalves Rocir Leite Filipe??
MapReduce Dean and Ghemawat. MapReduce: Simplified Data Processing on Large Clusters. Communications of the ACM, Vol. 51, No. 1, January Shahram.
MapReduce Simplified Data Processing on Large Clusters Google, Inc. Presented by Prasad Raghavendra.
Distributed Computations MapReduce
Lecture 2 – MapReduce: Theory and Implementation CSE 490h – Introduction to Distributed Computing, Spring 2007 Except as otherwise noted, the content of.
L22: SC Report, Map Reduce November 23, Map Reduce What is MapReduce? Example computing environment How it works Fault Tolerance Debugging Performance.
MapReduce Simplified Data Processing On large Clusters Jeffery Dean and Sanjay Ghemawat.
Lecture 2 – MapReduce CPE 458 – Parallel Programming, Spring 2009 Except as otherwise noted, the content of this presentation is licensed under the Creative.
MapReduce : Simplified Data Processing on Large Clusters Hongwei Wang & Sihuizi Jin & Yajing Zhang
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science MapReduce:
MapReduce CSE 454 Slides based on those by Jeff Dean, Sanjay Ghemawat, and Dan Weld.
Map Reduce Architecture
Take An Internal Look at Hadoop Hairong Kuang Grid Team, Yahoo! Inc
MapReduce: Simpliyed Data Processing on Large Clusters Jeffrey Dean and Sanjay Ghemawat To appear in OSDI 2004 (Operating Systems Design and Implementation)
Advanced Topics: MapReduce ECE 454 Computer Systems Programming Topics: Reductions Implemented in Distributed Frameworks Distributed Key-Value Stores Hadoop.
SIDDHARTH MEHTA PURSUING MASTERS IN COMPUTER SCIENCE (FALL 2008) INTERESTS: SYSTEMS, WEB.
MapReduce.
Introduction to Parallel Programming MapReduce Except where otherwise noted all portions of this work are Copyright (c) 2007 Google and are licensed under.
By: Jeffrey Dean & Sanjay Ghemawat Presented by: Warunika Ranaweera Supervised by: Dr. Nalin Ranasinghe.
MapReduce. Web data sets can be very large – Tens to hundreds of terabytes Cannot mine on a single server Standard architecture emerging: – Cluster of.
Google MapReduce Simplified Data Processing on Large Clusters Jeff Dean, Sanjay Ghemawat Google, Inc. Presented by Conroy Whitney 4 th year CS – Web Development.
MapReduce: Simplified Data Processing on Large Clusters 컴퓨터학과 김정수.
Süleyman Fatih GİRİŞ CONTENT 1. Introduction 2. Programming Model 2.1 Example 2.2 More Examples 3. Implementation 3.1 ExecutionOverview 3.2.
Map Reduce for data-intensive computing (Some of the content is adapted from the original authors’ talk at OSDI 04)
Parallel Programming Models Basic question: what is the “right” way to write parallel programs –And deal with the complexity of finding parallelism, coarsening.
MapReduce: Simplified Data Processing on Large Clusters Jeffrey Dean and Sanjay Ghemawat.
The Technology Behind. The World Wide Web In July 2008, Google announced that they found 1 trillion unique webpages! Billions of new web pages appear.
MapReduce: Hadoop Implementation. Outline MapReduce overview Applications of MapReduce Hadoop overview.
Map Reduce: Simplified Processing on Large Clusters Jeffrey Dean and Sanjay Ghemawat Google, Inc. OSDI ’04: 6 th Symposium on Operating Systems Design.
MAP REDUCE : SIMPLIFIED DATA PROCESSING ON LARGE CLUSTERS Presented by: Simarpreet Gill.
SLIDE 1IS 240 – Spring 2013 Prof. Ray Larson University of California, Berkeley School of Information Principles of Information Retrieval Lecture.
MapReduce How to painlessly process terabytes of data.
MapReduce M/R slides adapted from those of Jeff Dean’s.
Mass Data Processing Technology on Large Scale Clusters Summer, 2007, Tsinghua University All course material (slides, labs, etc) is licensed under the.
MapReduce Kristof Bamps Wouter Deroey. Outline Problem overview MapReduce o overview o implementation o refinements o conclusion.
1 MapReduce: Theory and Implementation CSE 490h – Intro to Distributed Computing, Modified by George Lee Except as otherwise noted, the content of this.
SLIDE 1IS 240 – Spring 2013 MapReduce, HBase, and Hive University of California, Berkeley School of Information IS 257: Database Management.
MapReduce and the New Software Stack CHAPTER 2 1.
By Jeff Dean & Sanjay Ghemawat Google Inc. OSDI 2004 Presented by : Mohit Deopujari.
MapReduce: Simplified Data Processing on Large Clusters Lim JunSeok.
MapReduce : Simplified Data Processing on Large Clusters P 謝光昱 P 陳志豪 Operating Systems Design and Implementation 2004 Jeffrey Dean, Sanjay.
C-Store: MapReduce Jianlin Feng School of Software SUN YAT-SEN UNIVERSITY May. 22, 2009.
Map Reduce. Functional Programming Review r Functional operations do not modify data structures: They always create new ones r Original data still exists.
MapReduce: Simplified Data Processing on Large Clusters By Dinesh Dharme.
MapReduce: simplified data processing on large clusters Jeffrey Dean and Sanjay Ghemawat.
Data Parallel and Graph Parallel Systems for Large-scale Data Processing Presenter: Kun Li.
Dr Zahoor Tanoli COMSATS.  Certainly not suitable to process huge volumes of scalable data  Creates too much of a bottleneck.
MapReduce: Simplied Data Processing on Large Clusters Written By: Jeffrey Dean and Sanjay Ghemawat Presented By: Manoher Shatha & Naveen Kumar Ratkal.
1 Student Date Time Wei Li Nov 30, 2015 Monday 9:00-9:25am Shubbhi Taneja Nov 30, 2015 Monday9:25-9:50am Rodrigo Sanandan Dec 2, 2015 Wednesday9:00-9:25am.
COMP7330/7336 Advanced Parallel and Distributed Computing MapReduce - Introduction Dr. Xiao Qin Auburn University
MapReduce: Simplified Data Processing on Large Clusters Jeff Dean, Sanjay Ghemawat Google, Inc.
Lecture 4. MapReduce Instructor: Weidong Shi (Larry), PhD
Cloud Computing.
MapReduce: Simplified Data Processing on Large Clusters
The Map-Reduce Framework
Auburn University COMP7330/7336 Advanced Parallel and Distributed Computing MapReduce - Introduction Dr. Xiao Qin Auburn.
Lecture 3. MapReduce Instructor: Weidong Shi (Larry), PhD
MapReduce Simplied Data Processing on Large Clusters
湖南大学-信息科学与工程学院-计算机与科学系
CS427 Multicore Architecture and Parallel Computing
MapReduce: Simplified Data Processing on Large Clusters
5/7/2019 Map Reduce Map reduce.
MapReduce: Simplified Data Processing on Large Clusters
Presentation transcript:

1 The Map-Reduce Framework Compiled by Mark Silberstein, using slides from Dan Weld’s class at U. Washington, Yaniv Carmeli and some other

2 The MapReduce Paradigm  You are given a phonebook:  How many entries have the last name “Smith”?  Create a list of all last names, with the numbers of entries they appear in.  How many entries have the first name “John”?  Create a list of all first names, with the numbers of entries they appear in.  How can these tasks be distributed to many computers?

Motivation  Large-Scale Data Processing  Want to use 1000s of CPUs But don’t want hassle of managing things  MapReduce framework provides  Automatic parallelization & distribution  Fault tolerance  I/O scheduling  Monitoring & status updates

Map/Reduce  Map/Reduce  Programming model from Lisp  (and other functional languages)‏  Many problems can be phrased this way  Easy to distribute across nodes  Nice retry/failure semantics

Map in Lisp (Scheme)‏  (map f list [list 2 list 3 …])‏  (map square ‘( ))‏  ( )‏  (reduce + ‘( ))‏  (+ 16 (+ 9 (+ 4 1) ) )‏  30  (reduce + (map square (map – l 1 l 2 ))))‏ Unary operator Binary operator

Map/Reduce ala Google  map(key, val) is run on each item in set  emits new-key / new-val pairs  reduce(new-key, new-vals) is run for each unique new-key emitted by map()‏  emits final output

count words in docs  Input consists of (url, contents) pairs  map(key=url, val=contents): ▫ For each word w in contents, emit (w, “1”)‏  reduce(key=word, values=uniq_counts): ▫ Sum all “1”s in values list ▫ Emit result “(word, sum)”

Count, Illustrated map(key=url, val=contents): For each word w in contents, emit (w, “1”)‏ reduce(key=word, values=uniq_counts): Sum all “1”s in values list Emit result “(word, sum)” see bob throw see spot run see1 bob1 run1 see 1 spot 1 throw1 bob1 run1 see 2 spot 1 throw1

Grep  Input consists of (file, regexp)‏  map(file, regexp): If contents matches regexp, emit (regexp, #line)‏  reduce(regexp, #line): Don’t do anything; just emit line

Reverse Web-Link Graph  Map  For each URL linking to target, …  Output pairs  Reduce  Concatenate list of all source URLs  Outputs: pairs

Inverted Index  Result:  Map  For each page,  Output  Reduce  Concatenate all pages of the word  Output

12 Shuffle Map-Reduce Framework Input: a collection of keys and their values User- written Map function Each input (k,v) mapped to set of intermediate key-value pairs sort all key-value pairs by key One list of intermediate values for each key: (k, [v 1,…,v n ])‏ Each list of values is reduced to a single value for that key User- written Reduce function

Parallelization  How is this distributed? 1. Partition input key/value pairs into chunks, run map() tasks in parallel 2. Shuffle: After all map()s are complete, consolidate all emitted values for each unique emitted key 3. Now partition space of output map keys, and run reduce() in parallel  If map() or reduce() fails, reexecute!

Shuffle

Semantics Assumptions on Map and Reduce operations Map has no side effects Reduce is – Associative (a#b)#c= a#(b#c) – Commutative (a#b)=(b#a) – Idempotent

Another example  In a credit card company:  Given:  “credit card number”->”bargain cost”  Find the average bragain cost per month  Map(card, bargain)  Reduce(month, {total cost, #bargains})

17 Implementation  A program forks a master process and many worker processes.  Input is partitioned into some number of splits.  Worker processes are assigned either to perform Map on a split or Reduce for some set of intermediate keys.

18 Distributed Execution Overview User Program Worker Master Worker fork assign map assign reduce read local write remote read, sort Output File 0 Output File 1 write Split 0 Split 1 Split 2 Input Data Problems with efficiency of parallel implementation???

Distributed Execution 2

Another example: distributed sort  Map ?  Reduce ?  Something is missing....  Shuffle phase must allow distributed sort!

21 Responsibility of the Master 1.Assign Map and Reduce tasks to Workers. 2.Check that no Worker has died (because its processor failed). 3.Communicate results of Map to the Reduce tasks.

22 Communication from Map to Reduce  Select a number R of reduce tasks.  Divide the intermediate keys into R groups, e.g. by hashing.  Each Map task creates, at its own processor, R files of intermediate key- value pairs, one for each Reduce task.

Locality Master program divvies up tasks based on location of data: tries to have map() tasks on same machine as physical file data, or at least same rack map() task inputs are divided into MB blocks: same size as Google File System chunks

Fault Tolerance Master detects worker failures  Re-executes failed map() tasks  Re-executes in-progress reduce() tasks Master notices particular input key/values cause crashes in map(), and skips those values on re-execution.  Effect: Can work around bugs in third-party libraries

Strugglers No reduce can start until map is complete:  A single slow disk controller can rate-limit the whole process Master redundantly executes “slow” map tasks; uses results of first correctly- terminating replica

Task Granularity & Pipelining  Fine granularity tasks: #map tasks >> #machines  Minimizes time for fault recovery  Can pipeline shuffling with map execution  Better dynamic load balancing  Often use 200,000 map & 5000 reduce tasks  Running on 2000 machines

 Sorting guarantees  within each reduce partition  Compression of intermediate data  Combiner  Perform reduce on local map results before shuffle  Useful for saving network bandwidth Other Refinements

Yet another example  Distributed single source shortest path  adjacency list representation (node -> list of neighbors)  Until all nodes are done: map(node, distance from source, {neighbors}) reduce(neighbor, {distance,distance,....}) –Output: {neighbor, minimal distance} “Graph Algorithms with MapReduce”:

29 Hadoop  An open-source implementation of Map-Reduce in Java.  Download from:  Main reference e-osdi04.pdf