1 / 21

Scalable Text Processing with MapReduce

Learn how to scale up text processing using MapReduce, a powerful programming model that handles system-level issues and allows you to focus on solving the problem at hand. Discover how to handle concurrency, distribute data, and aggregate results efficiently. Explore real-world applications, such as answering factoid questions and learning relations, and see how MapReduce is used in the Hadoop ecosystem.

marek
Télécharger la présentation

Scalable Text Processing with MapReduce

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Scalable Text Processing with MapReduce Jimmy Lin The iSchool University of Maryland Saturday, July 19, 2008 2008 New Frontiers in Computing Technology This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United StatesSee http://creativecommons.org/licenses/by-nc-sa/3.0/us/ for details

  2. Introduction • In text processing, we’ve seen the emergence and dominance of: • Empirical techniques • Data-driven research • Must scale up to larger datasets, or else: • Uninteresting conclusions on “toy” datasets • Ad hoc workarounds (e.g., approximations) • Unreasonably long experimental turnaround • How do we practically scale up? • Managing concurrency is difficult • Clusters are expensive

  3. How much data? • Wayback machine has ~2 PB (2006) • Google processes 20 PB a day (2008) • “all words ever spoken by human beings” ~ 5 EB • CERN’s LHC will generate 15 PB a year (2008) • NOAA has ~1 PB climate data (2007) 640K ought to be enough for anybody.

  4. What to do with more data? • Answering factoid questions • Pattern matching on the Web • Works amazingly well • Learning relations • Start with seed instances • Search for patterns on the Web • Using patterns to find more instances Who shot Abraham Lincoln?  Xshot Abraham Lincoln Wolfgang Amadeus Mozart (1756 - 1791) Einstein was born in 1879 Birthday-of(Mozart, 1756) Birthday-of(Einstein, 1879) PERSON (DATE – PERSON was born in DATE (Brill et al., TREC 2001; Lin, ACM TOIS 2007) (Agichtein and Gravano, DL 2000; Ravichandran and Hovy, ACL 2002; … )

  5. Scaling Up: Present Solution • Divide and conquer • Throw more machines at it “Work” Partition w1 w2 w3 “worker” “worker” “worker” r1 r2 r3 Combine “Result”

  6. It’s a bit more complex… Different programming models Fundamental issues Message Passing Shared Memory scheduling, data distribution, synchronization, inter-process communication, robustness, fault tolerance, … Memory Architectural issues Flynn’s taxonomy (SIMD, MIMD, etc.),network typology, bisection bandwidthUMA vs. NUMA, cache coherence P1 P2 P3 P4 P5 P1 P2 P3 P4 P5 Different programming constructs mutexes, conditional variables, barriers, … masters/slaves, producers/consumers, work queues, … Common problems livelock, deadlock, data starvation, priority inversion… dining philosophers, sleeping barbers, cigarette smokers, … The reality: programmer shoulders the burden of managing concurrency…

  7. MapReduce in a Nutshell • What’s different? • Runtime transparently handles system-level issues • Programmer focuses on solving the problem • General problem structure: • Iterate over a large number of records • Extract something of interest from each • Shuffle and sort intermediate results • Aggregate intermediate results • Generate final output • MapReduce provides a functional abstraction: • Programmer supplies “Mapper” and “Reducer” • Runtime automatically handles everything else! Map Reduce

  8. MapReduce Runtime • Handles scheduling • Assigns workers to map and reduce tasks • Handles data distribution • Gets map workers to the data • Handles synchronization • Shuffles intermediate key-value pairs to reduce workers • Handles faults • Detects worker failures and restarts • Everything happens on top of distributed FS • GFS = Google File System

  9. From MapReduce to Hadoop • Google’s proprietary MapReduce implementation is in C++ • Hadoop is an open-source MapReduce reimplementation in Java (lead by Yahoo) • HDFS is a reimplementation of GFS • Growing number of associated open source projects…

  10. “Cloud Computing” Initiative • Google/IBM’s Academic Cloud Computing Initiative (October 2007) • Initial pilot institutions: Washington, Berkeley, CMU, MIT, UMD • IBM provides UMD a Hadoop cluster • 20 machines (40 processors) • Couple of TB storage • Associated infrastructure support • Maryland does good work with the cluster! • Use it to tackle open research problems • Use it in the classroom

  11. Statistical Machine Translation Chris Dyer (Ph.D. student, Linguistics) Aaron Cordova (undergraduate, Computer Science) Alex Mont (undergraduate, Computer Science) • Conceptually simple:(translation from foreign f into English e) • Difficult in practice! • Phrase-Based Machine Translation (PBMT) : • Break up source sentence into little pieces (phrases) • Translate each phrase individually

  12. Phrasal Decomposition Example from Callison-Burch (2007)

  13. MT Architecture Word Alignment Phrase Extraction Training Data (vi, i saw) (la mesa pequeña, the small table) … i saw the small table vi la mesa pequeña Parallel Sentences he sat at the table the service was good LanguageModel Translation Model Target-Language Text Decoder maria no daba una bofetada a la bruja verde mary did not slap the green witch Foreign Input Sentence English Output Sentence

  14. The Data Bottleneck

  15. MT Architecture We’ve built MapReduce Implementations of these two components! Word Alignment Phrase Extraction Training Data (vi, i saw) (la mesa pequeña, the small table) … i saw the small table vi la mesa pequeña Parallel Sentences he sat at the table the service was good LanguageModel Translation Model Target-Language Text Decoder maria no daba una bofetada a la bruja verde mary did not slap the green witch Foreign Input Sentence English Output Sentence

  16. HMM Alignment: Giza Single-core commodity server

  17. HMM Alignment: MapReduce Single-core commodity server 38 processor cluster

  18. HMM Alignment: MapReduce 38 processor cluster 1/38 Single-core commodity server

  19. What’s the point? • The hypothetical, optimally-parallelized version doesn’t exist! • MapReduce occupies a sweet spot in the design space for a large class of problems: • Fast… in terms of running time • Easy… in terms of programming effort • Cheap… in terms of hardware costs • Chris Dyer, Aaron Cordova, Alex Mont, and Jimmy Lin. Fast, Easy, and Cheap: Construction of Statistical Machine Translation Models with MapReduce. Proceedings of the Third Workshop on Statistical Machine Translation at ACL 2008, June 2008, Columbus, Ohio.

  20. Beyond MapReduce • Hadoop and HDFS provides a good start • Everybody can play: • Different applications(e.g., from stat MT to biological sequence alignment) • Extensions to the programming model(e.g. MapReduceMerge) • Different hardware substrates(e.g., MapReduce on multicore, CELL, and GPU’s) • Development of a vibrant community • Academic-Industrial collaborations are the key • Government involvement: e.g., NSF’s Cluster Exploratory (CLuE) • Education plays a critical role! (Yang et al., SIGMOD 2007; Ranger et al., HPCA 2007; Kruijf and Sankaralingam, 2007; He et al., 2007)

  21. Acknowledgements • Google: Christophe Bisciglia, et al. • IBM: Dennis Quan, Eugene Hung, et al. • Thirteen bright students from UMD: Tamer Elsayed (CS Ph.D.) Chris Dyer (Linguistics Ph.D.) Greg Jablonski (iSchool masters) Alex Mont (CS ugrad) Alan Jackoway (CS ugrad) Aaron Cordova (CS ugrad) Denis Filimonov (Linguistics Ph.D.) Chang Hu (CS Ph.D.) Hua Wei (Geography Ph.D.) Punit Mehta (iSchool masters) Mike Schatz (CS Ph.D.) George Caragea (CS Ph.D.) Christiam Camacho (iSchool masters)

More Related