Data-Intensive Computing with MapReduce

Slides:



Advertisements
Similar presentations
Database and MapReduce
Advertisements

Parallel Computing MapReduce Examples Parallel Efficiency Assignment
Database and MapReduce Based on slides from Jimmy Lin’s lecture slides ( d-2010-Spring/index.html) (licensed under.
INTEGRATING BIG DATA TECHNOLOGY INTO LEGACY SYSTEMS Robert Cooley, Ph.D.CodeFreeze 1/16/2014.
Data-Intensive Computing with MapReduce/Pig Pramod Bhatotia MPI-SWS Distributed Systems – Winter Semester 2014.
Big Data Infrastructure
Cloud Computing Lecture #3 More MapReduce Jimmy Lin The iSchool University of Maryland Wednesday, September 10, 2008 This work is licensed under a Creative.
LBSC 690 Session #7 Structured Information: Databases Jimmy Lin The iSchool University of Maryland Wednesday, October 15, 2008 This work is licensed under.
MapReduce and databases Data-Intensive Information Processing Applications ― Session #7 Jimmy Lin University of Maryland Tuesday, March 23, 2010 This work.
Chapter 3 Database Management
Jimmy Lin The iSchool University of Maryland Wednesday, April 15, 2009
Chris Olston Benjamin Reed Utkarsh Srivastava Ravi Kumar Andrew Tomkins Pig Latin: A Not-So-Foreign Language For Data Processing Research.
Design Patterns for Efficient Graph Algorithms in MapReduce Jimmy Lin and Michael Schatz University of Maryland Tuesday, June 29, 2010 This work is licensed.
Bigtable, Hive, and Pig Data-Intensive Information Processing Applications ― Session #12 Jimmy Lin University of Maryland Tuesday, April 27, 2010 This.
Designing a Data Warehouse
Cloud Computing Other Mapreduce issues Keke Chen.
PARALLEL DBMS VS MAP REDUCE “MapReduce and parallel DBMSs: friends or foes?” Stonebraker, Daniel Abadi, David J Dewitt et al.
Hive: A data warehouse on Hadoop Based on Facebook Team’s paperon Facebook Team’s paper 8/18/20151.
HADOOP ADMIN: Session -2
Design Patterns for Efficient Graph Algorithms in MapReduce Jimmy Lin and Michael Schatz University of Maryland MLG, January, 2014 Jaehwan Lee.
USING HADOOP & HBASE TO BUILD CONTENT RELEVANCE & PERSONALIZATION Tools to build your big data application Ameya Kanitkar.
Chris Olston Benjamin Reed Utkarsh Srivastava Ravi Kumar Andrew Tomkins Pig Latin: A Not-So-Foreign Language For Data Processing Research.
MapReduce April 2012 Extract from various presentations: Sudarshan, Chungnam, Teradata Aster, …
CS525: Special Topics in DBs Large-Scale Data Management Hadoop/MapReduce Computing Paradigm Spring 2013 WPI, Mohamed Eltabakh 1.
HBase A column-centered database 1. Overview An Apache project Influenced by Google’s BigTable Built on Hadoop ▫A distributed file system ▫Supports Map-Reduce.
Presented by CH.Anusha.  Apache Hadoop framework  HDFS and MapReduce  Hadoop distributed file system  JobTracker and TaskTracker  Apache Hadoop NextGen.
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
Distributed Indexing of Web Scale Datasets for the Cloud {ikons, eangelou, Computing Systems Laboratory School of Electrical.
Hadoop/MapReduce Computing Paradigm 1 Shirish Agale.
Introduction to Hadoop and HDFS
Contents HADOOP INTRODUCTION AND CONCEPTUAL OVERVIEW TERMINOLOGY QUICK TOUR OF CLOUDERA MANAGER.
CSE 486/586 CSE 486/586 Distributed Systems Data Analytics Steve Ko Computer Sciences and Engineering University at Buffalo.
Map-Reduce-Merge: Simplified Relational Data Processing on Large Clusters Hung-chih Yang(Yahoo!), Ali Dasdan(Yahoo!), Ruey-Lung Hsiao(UCLA), D. Stott Parker(UCLA)
An Introduction to HDInsight June 27 th,
Large scale IP filtering using Apache Pig and case study Kaushik Chandrasekaran Nabeel Akheel.
Big Data Analytics Large-Scale Data Management Big Data Analytics Data Science and Analytics How to manage very large amounts of data and extract value.
Chapter 9 Database Systems © 2007 Pearson Addison-Wesley. All rights reserved.
Chris Olston Benjamin Reed Utkarsh Srivastava Ravi Kumar Andrew Tomkins Pig Latin: A Not-So-Foreign Language For Data Processing Research.
MapReduce Algorithm Design Based on Jimmy Lin’s slides
MapReduce and Data Management Based on slides from Jimmy Lin’s lecture slides ( (licensed.
CS525: Big Data Analytics MapReduce Computing Paradigm & Apache Hadoop Open Source Fall 2013 Elke A. Rundensteiner 1.
Physical Database Design Purpose- translate the logical description of data into the technical specifications for storing and retrieving data Goal - create.
Hadoop/MapReduce Computing Paradigm 1 CS525: Special Topics in DBs Large-Scale Data Management Presented By Kelly Technologies
Big Data Infrastructure Week 6: Analyzing Relational Data (1/3) This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0.
Tallahassee, Florida, 2016 COP5725 Advanced Database Systems MapReduce Spring 2016.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 11: BIG DATA AND.
COMP7330/7336 Advanced Parallel and Distributed Computing MapReduce - Introduction Dr. Xiao Qin Auburn University
Big Data Infrastructure Week 7: Analyzing Relational Data (2/3) This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0.
Big Data Infrastructure
Image taken from: slideshare
Big Data Infrastructure
Hadoop.
Distributed Programming in “Big Data” Systems Pramod Bhatotia wp
INTRODUCTION TO PIG, HIVE, HBASE and ZOOKEEPER
Spark SQL.
RDDs and Spark.
Introduction to PIG, HIVE, HBASE & ZOOKEEPER
Cse 344 May 4th – Map/Reduce.
MapReduce and Data Management
Implementation of Relational Operations
Charles Tappert Seidenberg School of CSIS, Pace University
Graph Algorithms Jimmy Lin University of Maryland
Evaluation of Relational Operations: Other Techniques
Data Warehousing Concepts
Data-Intensive Distributed Computing
Pig and pig latin: An Introduction
Copyright © JanBask Training. All rights reserved Get Started with Hadoop Hive HiveQL Languages.
Graph Algorithms Jimmy Lin University of Maryland
Map Reduce, Types, Formats and Features
Presentation transcript:

Data-Intensive Computing with MapReduce Session 10: Data Warehousing Jimmy Lin University of Maryland Thursday, April 4, 2013 This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States See http://creativecommons.org/licenses/by-nc-sa/3.0/us/ for details

~6 people use analytics stack daily “Yesterday” ~150 people total ~60 Hadoop nodes ~6 people use analytics stack daily

“Today” ~1400 people total 10s of Ks of Hadoop nodes, multiple DCs 10s of PBs total Hadoop DW capacity ~100 TB ingest daily dozens of teams use Hadoop daily 10s of Ks of Hadoop jobs daily

>100 PB of user data + 500 TB/day (8/2012) processes 20 PB a day (2008) crawls 20B web pages a day (2012) 150 PB on 50k+ servers running 15k apps (6/2011) >10 PB data, 75B DB calls per day (6/2012) >100 PB of user data + 500 TB/day (8/2012)

Today’s Agenda How we got here: the historical perspective MapReduce algorithms for processing relational data Evolving roles of relational databases and MapReduce

How we get here… Source: www.flickr.com/photos/thiagoalmeida/250190676/

Source: Wikipedia (Industrial Revolution)

Source: Wikipedia

Business Intelligence & Data Warehousing Two Early Examples: Market basket analysis Credit card fraud detection Source: Wikipedia (Warehouse)

Database Workloads OLTP (online transaction processing) Typical applications: e-commerce, banking, airline reservations User facing: real-time, low latency, highly-concurrent Tasks: relatively small set of “standard” transactional queries Data access pattern: random reads, updates, writes (involving relatively small amounts of data) OLAP (online analytical processing) Typical applications: business intelligence, data mining Back-end processing: batch workloads, less concurrency Tasks: complex analytical queries, often ad hoc Data access pattern: table scans, large amounts of data per query

One Database or Two? Downsides of co-existing OLTP and OLAP workloads Poor memory management Conflicting data access patterns Variable latency Solution: separate databases User-facing OLTP database for high-volume transactions Data warehouse for OLAP workloads How do we connect the two?

OLTP/OLAP Architecture ETL (Extract, Transform, and Load)

OLTP/OLAP Integration OLTP database for user-facing transactions Extract-Transform-Load (ETL) Extract records from source Transform: clean data, check integrity, aggregate, etc. Load into OLAP database OLAP database for data warehousing

Three Classes of Activities Dashboards Ad hoc analyses Data products

Structure of Data Warehouses SELECT P.Brand, S.Country, SUM(F.Units_Sold) FROM Fact_Sales F INNER JOIN Dim_Date D ON F.Date_Id = D.Id INNER JOIN Dim_Store S ON F.Store_Id = S.Id INNER JOIN Dim_Product P ON F.Product_Id = P.Id WHERE D.YEAR = 1997 AND P.Product_Category = 'tv' GROUP BY P.Brand, S.Country; Source: Wikipedia (Star Schema)

OLAP Cubes Common operations slice and dice roll up/drill down pivot time Common operations slice and dice roll up/drill down pivot product store

OLAP Cubes: Research Challenges Fundamentally, lots of group-bys and aggregations How to take advantage of schema structure to avoid repeated work? Cube materialization Realistic to materialize the entire cube? If not, how/when/what to materialize?

Fast forward…

Jeff Hammerbacher, Information Platforms and the Rise of the Data Scientist. In, Beautiful Data, O’Reilly, 2009. “On the first day of logging the Facebook clickstream, more than 400 gigabytes of data was collected. The load, index, and aggregation processes for this data set really taxed the Oracle data warehouse. Even after significant tuning, we were unable to aggregate a day of clickstream data in less than 24 hours.”

What’s changed? Dropping cost of disks Types of data collected Cheaper to store everything than to figure out what to throw away Types of data collected From data that’s obviously valuable to data whose value is less apparent Rise of social media and user-generated content Large increase in data volume Growing maturity of data mining techniques Demonstrates value of data analytics Virtuous product growth cycle

ETL Bottleneck ETL is typically a nightly task: Hadoop is perfect: What happens if processing 24 hours of data takes longer than 24 hours? Hadoop is perfect: Ingest is limited by speed of HDFS Scales out with more nodes Massively parallel Ability to use any processing tool Much cheaper than parallel databases ETL is a batch process anyway!

MapReduce algorithms for processing relational data Source: www.flickr.com/photos/stikatphotography/1590190676/

Source: www.flickr.com/photos/7518432@N06/2237536651/

Design Pattern: Secondary Sorting MapReduce sorts input to reducers by key Values are arbitrarily ordered What if want to sort value also? E.g., k → (v1, r), (v3, r), (v4, r), (v8, r)…

Secondary Sorting: Solutions Buffer values in memory, then sort Why is this a bad idea? Solution 2: “Value-to-key conversion” design pattern: form composite intermediate key, (k, v1) Let execution framework do the sorting Preserve state across multiple key-value pairs to handle processing Anything else we need to do?

Value-to-Key Conversion Before k → (v1, r), (v4, r), (v8, r), (v3, r)… Values arrive in arbitrary order… After (k, v1) → (v1, r) Values arrive in sorted order… (k, v3) → (v3, r) Process by preserving state across multiple keys (k, v4) → (v4, r) Remember to partition correctly! (k, v8) → (v8, r) …

Relational Databases A relational database is comprised of tables Each table represents a relation = collection of tuples (rows) Each tuple consists of multiple fields

Working Scenario Two tables: Analyses we might want to perform: User demographics (gender, age, income, etc.) User page visits (URL, time spent, etc.) Analyses we might want to perform: Statistics on demographic characteristics Statistics on page visits Statistics on page visits by URL Statistics on page visits by demographic characteristic …

Relational Algebra Primitives Other operations Projection () Selection () Cartesian product () Set union () Set difference () Rename () Other operations Join (⋈) Group by… aggregation …

Projection R1 R1 R2 R2 R3 R3 R4 R4 R5 R5

Projection in MapReduce Easy! Map over tuples, emit new tuples with appropriate attributes No reducers, unless for regrouping or resorting tuples Alternatively: perform in reducer, after some other processing Basically limited by HDFS streaming speeds Speed of encoding/decoding tuples becomes important Take advantage of compression when available Semistructured data? No problem!

Selection R1 R2 R1 R3 R3 R4 R5

Selection in MapReduce Easy! Map over tuples, emit only tuples that meet criteria No reducers, unless for regrouping or resorting tuples Alternatively: perform in reducer, after some other processing Basically limited by HDFS streaming speeds Speed of encoding/decoding tuples becomes important Take advantage of compression when available Semistructured data? No problem!

Group by… Aggregation Example: What is the average time spent per URL? In SQL: SELECT url, AVG(time) FROM visits GROUP BY url In MapReduce: Map over tuples, emit time, keyed by url Framework automatically groups values by keys Compute average in reducer Optimize with combiners

Relational Joins Source: Microsoft Office Clip Art

Relational Joins R1 S1 R2 S2 R3 S3 R4 S4 R1 S2 R2 S4 R3 S1 R4 S3

Types of Relationships Many-to-Many One-to-Many One-to-One

Join Algorithms in MapReduce Reduce-side join Map-side join In-memory join Striped variant Memcached variant

Reduce-side Join Basic idea: group by join key Two variants Map over both sets of tuples Emit tuple as value with join key as the intermediate key Execution framework brings together tuples sharing the same key Perform actual join in reducer Similar to a “sort-merge join” in database terminology Two variants 1-to-1 joins 1-to-many and many-to-many joins

Reduce-side Join: 1-to-1 Map keys values R1 R1 R4 R4 S2 S2 S3 S3 Reduce keys values R1 S2 S3 R4 Note: no guarantee if R is going to come first or S

Reduce-side Join: 1-to-many Map keys values R1 R1 S2 S2 S3 S3 S9 S9 Reduce keys values R1 S2 S3 … What’s the problem?

Reduce-side Join: V-to-K Conversion In reducer… keys values R1 New key encountered: hold in memory Cross with records from other set S2 S3 S9 R4 New key encountered: hold in memory Cross with records from other set S3 S7

Reduce-side Join: many-to-many In reducer… keys values R1 R5 Hold in memory R8 S2 Cross with records from other set S3 S9 What’s the problem?

Map-side Join: Basic Idea Assume two datasets are sorted by the join key: R1 S2 R2 S4 R4 S3 R3 S1 A sequential scan through both datasets to join (called a “merge join” in database terminology)

Map-side Join: Parallel Scans If datasets are sorted by join key, join can be accomplished by a scan over both datasets How can we accomplish this in parallel? Partition and sort both datasets in the same manner In MapReduce: Map over one dataset, read from other corresponding partition No reducers necessary (unless to repartition or resort) Consistently partitioned datasets: realistic to expect?

In-Memory Join Basic idea: load one dataset into memory, stream over other dataset Works if R << S and R fits into memory Called a “hash join” in database terminology MapReduce implementation Distribute R to all nodes Map over S, each mapper loads R in memory, hashed by join key For every tuple in S, look up join key in R No reducers, unless for regrouping or resorting tuples

In-Memory Join: Variants Striped variant: R too big to fit into memory? Divide R into R1, R2, R3, … s.t. each Rn fits into memory Perform in-memory join: n, Rn ⋈ S Take the union of all join results Memcached join: Load R into memcached Replace in-memory hash lookup with memcached lookup

Memcached Circa 2008 Architecture Caching servers: 15 million requests per second, 95% handled by memcache (15 TB of RAM) Database layer: 800 eight-core Linux servers running MySQL (40 TB user data) Source: Technology Review (July/August, 2008)

Memcached Join Memcached join: Capacity and scalability? Latency? Load R into memcached Replace in-memory hash lookup with memcached lookup Capacity and scalability? Memcached capacity >> RAM of individual node Memcached scales out with cluster Latency? Memcached is fast (basically, speed of network) Batch requests to amortize latency costs Source: See tech report by Lin et al. (2009)

Which join to use? In-memory join > map-side join > reduce-side join Why? Limitations of each? In-memory join: memory Map-side join: sort order and partitioning Reduce-side join: general purpose

Processing Relational Data: Summary MapReduce algorithms for processing relational data: Group by, sorting, partitioning are handled automatically by shuffle/sort in MapReduce Selection, projection, and other computations (e.g., aggregation), are performed either in mapper or reducer Multiple strategies for relational joins Complex operations require multiple MapReduce jobs Example: top ten URLs in terms of average time spent Opportunities for automatic optimization

MapReduce algorithms for processing relational data Source: www.flickr.com/photos/7518432@N06/2237536651/

Need for High-Level Languages Hadoop is great for large-data processing! But writing Java programs for everything is verbose and slow Data scientists don’t want to write Java Solution: develop higher-level data processing languages Hive: HQL is like SQL Pig: Pig Latin is a bit like Perl

Hive and Pig Hive: data warehousing application in Hadoop Query language is HQL, variant of SQL Tables stored on HDFS with different encodings Developed by Facebook, now open source Pig: large-scale data processing system Scripts are written in Pig Latin, a dataflow language Programmer focuses on data transformations Developed by Yahoo!, now open source Common idea: Provide higher-level language to facilitate large-data processing Higher-level language “compiles down” to Hadoop jobs

Hive: Example Hive looks similar to an SQL database Relational join on two tables: Table of word counts from Shakespeare collection Table of word counts from the bible SELECT s.word, s.freq, k.freq FROM shakespeare s JOIN bible k ON (s.word = k.word) WHERE s.freq >= 1 AND k.freq >= 1 ORDER BY s.freq DESC LIMIT 10; the 25848 62394 I 23031 8854 and 19671 38985 to 18038 13526 of 16700 34654 a 14170 8057 you 12702 2720 my 11297 4135 in 10797 12445 is 8882 6884 Source: Material drawn from Cloudera training VM

Hive: Behind the Scenes SELECT s.word, s.freq, k.freq FROM shakespeare s JOIN bible k ON (s.word = k.word) WHERE s.freq >= 1 AND k.freq >= 1 ORDER BY s.freq DESC LIMIT 10; (Abstract Syntax Tree) (TOK_QUERY (TOK_FROM (TOK_JOIN (TOK_TABREF shakespeare s) (TOK_TABREF bible k) (= (. (TOK_TABLE_OR_COL s) word) (. (TOK_TABLE_OR_COL k) word)))) (TOK_INSERT (TOK_DESTINATION (TOK_DIR TOK_TMP_FILE)) (TOK_SELECT (TOK_SELEXPR (. (TOK_TABLE_OR_COL s) word)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL s) freq)) (TOK_SELEXPR (. (TOK_TABLE_OR_COL k) freq))) (TOK_WHERE (AND (>= (. (TOK_TABLE_OR_COL s) freq) 1) (>= (. (TOK_TABLE_OR_COL k) freq) 1))) (TOK_ORDERBY (TOK_TABSORTCOLNAMEDESC (. (TOK_TABLE_OR_COL s) freq))) (TOK_LIMIT 10))) (one or more of MapReduce jobs)

Hive: Behind the Scenes STAGE DEPENDENCIES: Stage-1 is a root stage Stage-2 depends on stages: Stage-1 Stage-0 is a root stage STAGE PLANS: Stage: Stage-1 Map Reduce Alias -> Map Operator Tree: s TableScan alias: s Filter Operator predicate: expr: (freq >= 1) type: boolean Reduce Output Operator key expressions: expr: word type: string sort order: + Map-reduce partition columns: tag: 0 value expressions: expr: freq type: int k alias: k tag: 1 Stage: Stage-2 Map Reduce Alias -> Map Operator Tree: hdfs://localhost:8022/tmp/hive-training/364214370/10002 Reduce Output Operator key expressions: expr: _col1 type: int sort order: - tag: -1 value expressions: expr: _col0 type: string expr: _col2 Reduce Operator Tree: Extract Limit File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.TextInputFormat output format: org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat Stage: Stage-0 Fetch Operator limit: 10 Reduce Operator Tree: Join Operator condition map: Inner Join 0 to 1 condition expressions: 0 {VALUE._col0} {VALUE._col1} 1 {VALUE._col0} outputColumnNames: _col0, _col1, _col2 Filter Operator predicate: expr: ((_col0 >= 1) and (_col2 >= 1)) type: boolean Select Operator expressions: expr: _col1 type: string expr: _col0 type: int expr: _col2 File Output Operator compressed: false GlobalTableId: 0 table: input format: org.apache.hadoop.mapred.SequenceFileInputFormat output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat

Pig: Example Task: Find the top 10 most visited pages in each category Visits Url Info User Url Time Amy cnn.com 8:00 bbc.com 10:00 flickr.com 10:05 Fred 12:00 Url Category PageRank cnn.com News 0.9 bbc.com 0.8 flickr.com Photos 0.7 espn.com Sports Pig Slides adapted from Olston et al. (SIGMOD 2008)

Pig Query Plan Load Visits Group by url Foreach url Load Url Info generate count Load Url Info Join on url Group by category Foreach category generate top10(urls) Pig Slides adapted from Olston et al. (SIGMOD 2008)

Pig Script visits = load ‘/data/visits’ as (user, url, time); gVisits = group visits by url; visitCounts = foreach gVisits generate url, count(visits); urlInfo = load ‘/data/urlInfo’ as (url, category, pRank); visitCounts = join visitCounts by url, urlInfo by url; gCategories = group visitCounts by category; topUrls = foreach gCategories generate top(visitCounts,10); store topUrls into ‘/data/topUrls’; Pig Slides adapted from Olston et al. (SIGMOD 2008)

Pig Script in Hadoop Map1 Load Visits Group by url Reduce1 Map2 Foreach url generate count Load Url Info Join on url Reduce2 Map3 Group by category Reduce3 Foreach category generate top10(urls) Pig Slides adapted from Olston et al. (SIGMOD 2008)

What’s the role of MapReduce? Source: www.flickr.com/photos/rosipaw/4643095630/

ETL (Extract, Transform, and Load) Where Does Hadoop Go? OLTP OLAP What about here? ETL (Extract, Transform, and Load) Hadoop here?

A Major Step Backwards? MapReduce is a step backward in database access: Schemas are good Separation of the schema from the application is good High-level access languages are good MapReduce is poor implementation Brute force and only brute force (no indexes, for example) MapReduce is not novel MapReduce is missing features Bulk loader, indexing, updates, transactions… MapReduce is incompatible with DMBS tools Source: Blog post by DeWitt and Stonebraker

“there are known knowns; there are things we know we know “there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are unknown unknowns – the ones we don't know we don't know…” – Donald Rumsfeld Source: Wikipedia

Known and Unknown Unknowns Databases only help if you know what questions to ask “Known unknowns” What’s if you don’t know what you’re looking for? “Unknown unknowns”

OLTP/OLAP/Hadoop Architecture ETL (Extract, Transform, and Load) Why does this make sense? (Interesting to observe evolution of database companies’ view of Hadoop)

ETL: Redux Often, with noisy datasets, ETL is the analysis! Note that ETL necessarily involves brute force data scans L, then E and T?

Structure of Hadoop Warehouses Don’t normalize! Source: Wikipedia (Star Schema)

A Major Step Backwards? MapReduce is a step backward in database access: Schemas are good Separation of the schema from the application is good High-level access languages are good MapReduce is poor implementation Brute force and only brute force (no indexes, for example) MapReduce is not novel MapReduce is missing features Bulk loader, indexing, updates, transactions… MapReduce is incompatible with DMBS tools Bottom line: issue of maturity, not fundamental capability! Source: Blog post by DeWitt and Stonebraker

Projection in MapReduce Can we do better than brute force?

Selection in MapReduce Can we do better than brute force?

Relational Joins in MapReduce Query optimizers to the rescue!

Relational Databases vs. MapReduce Multipurpose: analysis and transactions; batch and interactive Data integrity via ACID transactions Lots of tools in software ecosystem (for ingesting, reporting, etc.) Supports SQL (and SQL integration, e.g., JDBC) Automatic SQL query optimization MapReduce (Hadoop): Designed for large clusters, fault tolerant Data is accessed in “native format” Supports many query languages Programmers retain control over performance Open source Source: O’Reilly Blog post by Joseph Hellerstein (11/19/2008)

Philosophical Differences Parallel relational databases Schema on write Failures are relatively infrequent “Possessive” of data Mostly proprietary MapReduce Schema on read Failures are relatively common In situ data processing Open source

Today’s Agenda How we got here: the historical perspective MapReduce algorithms for processing relational data Evolving roles of relational databases and MapReduce

Questions? Source: Wikipedia (Japanese rock garden)