Lecture 3: Bringing it all together

Slides:



Advertisements
Similar presentations
MAP REDUCE PROGRAMMING Dr G Sudha Sadasivam. Map - reduce sort/merge based distributed processing Best for batch- oriented processing Sort/merge is primitive.
Advertisements

MapReduce.
LIBRA: Lightweight Data Skew Mitigation in MapReduce
Mapreduce and Hadoop Introduce Mapreduce and Hadoop
Parallel Computing MapReduce Examples Parallel Efficiency Assignment
Problem-solving on large-scale clusters: theory and applications Lecture 3: Bringing it all together.
DISTRIBUTED COMPUTING & MAP REDUCE CS16: Introduction to Data Structures & Algorithms Thursday, April 17,
Distributed Computations
CS 345A Data Mining MapReduce. Single-node architecture Memory Disk CPU Machine Learning, Statistics “Classical” Data Mining.
Google’s Map Reduce. Commodity Clusters Web data sets can be very large – Tens to hundreds of terabytes Cannot mine on a single server Standard architecture.
Distributed Computations MapReduce
L22: SC Report, Map Reduce November 23, Map Reduce What is MapReduce? Example computing environment How it works Fault Tolerance Debugging Performance.
Introduction to Google MapReduce WING Group Meeting 13 Oct 2006 Hendra Setiawan.
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
Hadoop Ida Mele. Parallel programming Parallel programming is used to improve performance and efficiency In a parallel program, the processing is broken.
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.
Google MapReduce Simplified Data Processing on Large Clusters Jeff Dean, Sanjay Ghemawat Google, Inc. Presented by Conroy Whitney 4 th year CS – Web Development.
Map Reduce for data-intensive computing (Some of the content is adapted from the original authors’ talk at OSDI 04)
MapReduce: Simplified Data Processing on Large Clusters Jeffrey Dean and Sanjay Ghemawat.
MapReduce and Hadoop 1 Wu-Jun Li Department of Computer Science and Engineering Shanghai Jiao Tong University Lecture 2: MapReduce and Hadoop Mining Massive.
1 The Map-Reduce Framework Compiled by Mark Silberstein, using slides from Dan Weld’s class at U. Washington, Yaniv Carmeli and some other.
MapReduce – An overview Medha Atre (May 7, 2008) Dept of Computer Science Rensselaer Polytechnic Institute.
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.
MapReduce How to painlessly process terabytes of data.
MapReduce M/R slides adapted from those of Jeff Dean’s.
MapReduce Kristof Bamps Wouter Deroey. Outline Problem overview MapReduce o overview o implementation o refinements o conclusion.
Introduction to Search Engines Technology CS Technion, Winter 2013 Amit Gross Some slides are courtesy of: Edward Bortnikov & Ronny Lempel, Yahoo!
Lecture 2 – MapReduce: Theory and Implementation CSE 490h – Introduction to Distributed Computing, Winter 2008 Except as otherwise noted, the content of.
MapReduce and the New Software Stack CHAPTER 2 1.
By Jeff Dean & Sanjay Ghemawat Google Inc. OSDI 2004 Presented by : Mohit Deopujari.
Chapter 5 Ranking with Indexes 1. 2 More Indexing Techniques n Indexing techniques:  Inverted files - best choice for most applications  Suffix trees.
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 Basics Chapter 2 Lin and Dyer & /tutorial/
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
Lecture 3 – MapReduce: Implementation CSE 490h – Introduction to Distributed Computing, Spring 2009 Except as otherwise noted, the content of this presentation.
Lecture 4. MapReduce Instructor: Weidong Shi (Larry), PhD
”Map-Reduce-Merge: Simplified Relational Data Processing on Large Clusters” Published In SIGMOD '07 By Yahoo! Senthil Nathan N IIT Bombay.
Introduction to Google MapReduce
Distributed Programming in “Big Data” Systems Pramod Bhatotia wp
How to Parallelize an Algorithm
Large-scale file systems and Map-Reduce
MapReduce: Simplified Data Processing on Large Clusters
Hadoop MapReduce Framework
Map Reduce.
Auburn University COMP7330/7336 Advanced Parallel and Distributed Computing MapReduce - Introduction Dr. Xiao Qin Auburn.
MapReduce Simplified Data Processing on Large Cluster
Distributed Computations MapReduce/Dryad
MapReduce Computing Paradigm Basics Fall 2013 Elke A. Rundensteiner
Database Applications (15-415) Hadoop Lecture 26, April 19, 2016
MapReduce Simplied Data Processing on Large Clusters
湖南大学-信息科学与工程学院-计算机与科学系
February 26th – Map/Reduce
Hadoop Basics.
Cse 344 May 4th – Map/Reduce.
Chapter 2 Lin and Dyer & MapReduce Basics Chapter 2 Lin and Dyer &
Distributed System Gang Wu Spring,2018.
CS 345A Data Mining MapReduce This presentation has been altered.
Introduction to MapReduce
5/7/2019 Map Reduce Map reduce.
Chapter 2 Lin and Dyer & MapReduce Basics Chapter 2 Lin and Dyer &
COS 518: Distributed Systems Lecture 11 Mike Freedman
MapReduce: Simplified Data Processing on Large Clusters
Word Co-occurrence Chapter 3, Lin and Dryer.
Presentation transcript:

Lecture 3: Bringing it all together Except where otherwise noted all portions of this work are Copyright (c) 2007 Google and are licensed under the Creative Commons Attribution 3.0 License http://creativecommons.org/licenses/by/3.0/

Context and Review Data dependencies determine whether a problem can be formulated in MapReduce The properties of fold() and map() determine how to formulate a problem in MapReduce How do you parallelize fold()? map()?

MapReduce Introduction MapReduce is both a programming model and a clustered computing system A specific way of formulating a problem, which yields good parallelizability A system which takes a MapReduce-formulated problem and executes it on a large cluster Hides implementation details, such as hardware failures, grouping and sorting, scheduling … Previous lectures have focused on MapReduce- the-problem-formulation Today will mostly focus on MapReduce-the- system

MR Problem Formulation: Formal Definition MapReduce: mapreduce fm fr l = map (reducePerKey fr) (group (map fm l)) reducePerKey fr (k,v_list) = (k, (foldl (fr k) [] v_list)) Assume map here is actually concatMap. Argument l is a list of documents The result of first map is a list of key-value pairs The function fr takes 3 arguments key, context, current. With currying, this allows for locking the value of “key” for each list during the fold. MapReduce maps a fold over the sorted result of a map!

MR System Overview (1 of 2) Map: Preprocesses a set of files to generate intermediate key-value pairs As parallelized as you want Group: Partitions intermediate key-value pairs by unique key, generating a list of all associated values Reduce: For each key, iterates over value list Performs computation that requires context between iterations Parallelizable amongst different keys, but not within one key A common question is: how is map reduce different from cloning the input data N ways, and using N workers to process the data using the original non-MR formulation/

MR System Overview (2 of 2) Shamelessly stolen from Jeff Dean’s OSDI ‘04 presentation http://labs.google.com/papers/mapreduce-osdi04-slides/index.html

Example: MapReduce DocInfo (1 of 2) mapreduce fm fr l = map (reducePerKey fr) (group (map fm l)) reducePerKey fr (k,v_list) = (k, (foldl (fr k) [] v_list) Pseudocode for fm fm contents = concat [ [(“spaces”, (count_spaces contents))], (map (emit “raw”) (split contents)), (map (emit “scrub”) (scrub (split contents)))] emit label value = (label, (value, 1))

Example: MapReduce DocInfo (2 of 2) mapreduce fm fr l = map (reducePerKey fr) (group (map fm l)) reducePerKey fr (k,v_list) = (k, (foldl (fr k) [] v_list) Pseudocode for fr fr ‘spaces’ count (total:xs) = (total+count:xs) fr ‘raw’ (word,count) (result) = (update_result (word,count) result) fr ‘scrub’ (word,count) (result) =

Group Exercise Formulate the following as map reduces: Find the set of unique words in a document Input: a bunch of words Output: all the unique words (no repeats) Calculate per-employee taxes Input: a list of (employee, salary, month) tuples Output: a list of (employee, taxes due) pairs Randomly reorder sentences Input: a bunch of documents Output: all sentences in random order (may include duplicates) Compute the minesweeper grid/map Input: coordinates for the location of mines Output: coordinate/value pairs for all non-zero cells Can you think generalized techniques for decomposing problems?

MapReduce Parallelization: Execution Shamelessly stolen from Jeff Dean’s OSDI ‘04 presentation http://labs.google.com/papers/mapreduce-osdi04-slides/index.html

MapReduce Parallelization: Pipelining Finely granular tasks: many more map tasks than machines Better dynamic load balancing Minimizes time for fault recovery Can pipeline the shuffling/grouping while maps are still running Example: 2000 machines -> 200,000 map + 5000 reduce tasks Shamelessly stolen from Jeff Dean’s OSDI ‘04 presentation http://labs.google.com/papers/mapreduce-osdi04-slides/index.html

Example: MR DocInfo, revisited Do MapReduce DocInfo in 2 passes (instead of 1), performing all the work in the “group” step Map1: Tokenize document For each token output: (“raw:<word>”,1) (“scrubbed:<scrubbed_word>”, 1) Reduce1: For each key, ignore value list and output (key,1) Map2: For each token “type:value”, output (type,1) Reduce 2: For each key, output (key, (sum values))

Example: MR DocInfo, revisited Mapper Reducer Mapper Reducer Key: Connections are network links GFS is a cluster of storage machines Mapper GFS Of the 2 DocInfo MapReduce implementations, which is better? Define “better”. What resources are you considering? Dev time? CPU? Network? Disk? Complexity? Reusability?

Hadoop takes the generated class files and manages running them HaDoop-as-MapReduce mapreduce fm fr l = map (reducePerKey fr) (group (map fm l)) reducePerKey fr (k,v_list) = (k, (foldl (fr k) [] v_list) Hadoop: The fm and fr are function objects (classes) Class for fm implements the Mapper interface Map(WritableComparable key, Writable value, OutputCollector output, Reporter reporter) Class for fr implements the Reducer interface reduce(WritableComparable key, Iterator values, Hadoop takes the generated class files and manages running them

Bonus Materials: MR Runtime The following slides illustrate an example run of MapReduce on a Google cluster A sample job from the indexing pipeline, processes ~900 GB of crawled pages

From Jeff Dean’s OSDI ‘04 presentation MR Runtime (1 of 9) From Jeff Dean’s OSDI ‘04 presentation http://labs.google.com/papers/mapreduce-osdi04-slides/index.html

From Jeff Dean’s OSDI ‘04 presentation MR Runtime (2 of 9) From Jeff Dean’s OSDI ‘04 presentation http://labs.google.com/papers/mapreduce-osdi04-slides/index.html

From Jeff Dean’s OSDI ‘04 presentation MR Runtime (3 of 9) From Jeff Dean’s OSDI ‘04 presentation http://labs.google.com/papers/mapreduce-osdi04-slides/index.html

From Jeff Dean’s OSDI ‘04 presentation MR Runtime (4 of 9) From Jeff Dean’s OSDI ‘04 presentation http://labs.google.com/papers/mapreduce-osdi04-slides/index.html

From Jeff Dean’s OSDI ‘04 presentation MR Runtime (5 of 9) From Jeff Dean’s OSDI ‘04 presentation http://labs.google.com/papers/mapreduce-osdi04-slides/index.html

From Jeff Dean’s OSDI ‘04 presentation MR Runtime (6 of 9) From Jeff Dean’s OSDI ‘04 presentation http://labs.google.com/papers/mapreduce-osdi04-slides/index.html

From Jeff Dean’s OSDI ‘04 presentation MR Runtime (7 of 9) From Jeff Dean’s OSDI ‘04 presentation http://labs.google.com/papers/mapreduce-osdi04-slides/index.html

From Jeff Dean’s OSDI ‘04 presentation MR Runtime (8 of 9) From Jeff Dean’s OSDI ‘04 presentation http://labs.google.com/papers/mapreduce-osdi04-slides/index.html

From Jeff Dean’s OSDI ‘04 presentation MR Runtime (9 of 9) From Jeff Dean’s OSDI ‘04 presentation http://labs.google.com/papers/mapreduce-osdi04-slides/index.html