You are previewing MapReduce Design Patterns.

MapReduce Design Patterns

Cover of MapReduce Design Patterns by Donald Miner... Published by O'Reilly Media, Inc.
  1. MapReduce Design Patterns
  2. Dedication
  3. Preface
    1. Intended Audience
    2. Pattern Format
    3. The Examples in This Book
    4. Conventions Used in This Book
    5. Using Code Examples
    6. Safari® Books Online
    7. How to Contact Us
    8. Acknowldgements
  4. 1. Design Patterns and MapReduce
    1. Design Patterns
    2. MapReduce History
    3. MapReduce and Hadoop Refresher
    4. Hadoop Example: Word Count
    5. Pig and Hive
  5. 2. Summarization Patterns
    1. Numerical Summarizations
      1. Pattern Description
      2. Numerical Summarization Examples
    2. Inverted Index Summarizations
      1. Pattern Description
      2. Inverted Index Example
    3. Counting with Counters
      1. Pattern Description
      2. Counting with Counters Example
  6. 3. Filtering Patterns
    1. Filtering
      1. Pattern Description
      2. Filtering Examples
    2. Bloom Filtering
      1. Pattern Description
      2. Bloom Filtering Examples
    3. Top Ten
      1. Pattern Description
      2. Top Ten Examples
    4. Distinct
      1. Pattern Description
      2. Distinct Examples
  7. 4. Data Organization Patterns
    1. Structured to Hierarchical
      1. Pattern Description
      2. Structured to Hierarchical Examples
    2. Partitioning
      1. Pattern Description
      2. Partitioning Examples
    3. Binning
      1. Pattern Description
      2. Binning Examples
    4. Total Order Sorting
      1. Pattern Description
      2. Total Order Sorting Examples
    5. Shuffling
      1. Pattern Description
      2. Shuffle Examples
  8. 5. Join Patterns
    1. A Refresher on Joins
    2. Reduce Side Join
      1. Pattern Description
      2. Reduce Side Join Example
      3. Reduce Side Join with Bloom Filter
    3. Replicated Join
      1. Pattern Description
      2. Replicated Join Examples
    4. Composite Join
      1. Pattern Description
      2. Composite Join Examples
    5. Cartesian Product
      1. Pattern Description
      2. Cartesian Product Examples
  9. 6. Metapatterns
    1. Job Chaining
      1. With the Driver
      2. Job Chaining Examples
      3. With Shell Scripting
      4. With JobControl
    2. Chain Folding
      1. The ChainMapper and ChainReducer Approach
      2. Chain Folding Example
    3. Job Merging
      1. Job Merging Examples
  10. 7. Input and Output Patterns
    1. Customizing Input and Output in Hadoop
      1. InputFormat
      2. RecordReader
      3. OutputFormat
      4. RecordWriter
    2. Generating Data
      1. Pattern Description
      2. Generating Data Examples
    3. External Source Output
      1. Pattern Description
      2. External Source Output Example
    4. External Source Input
      1. Pattern Description
      2. External Source Input Example
    5. Partition Pruning
      1. Pattern Description
      2. Partition Pruning Examples
  11. 8. Final Thoughts and the Future of Design Patterns
    1. Trends in the Nature of Data
      1. Images, Audio, and Video
      2. Streaming Data
    2. The Effects of YARN
    3. Patterns as a Library or Component
    4. How You Can Help
  12. A. Bloom Filters
    1. Overview
    2. Use Cases
      1. Representing a Data Set
      2. Reduce Queries to External Database
      3. Google BigTable
    3. Downsides
    4. Tweaking Your Bloom Filter
  13. Index
  14. About the Authors
  15. Colophon
  16. Copyright
O'Reilly logo

Chapter 2. Summarization Patterns

Your data is large and vast, with more data coming into the system every day. This chapter focuses on design patterns that produce a top-level, summarized view of your data so you can glean insights not available from looking at a localized set of records alone. Summarization analytics are all about grouping similar data together and then performing an operation such as calculating a statistic, building an index, or just simply counting.

Calculating some sort of aggregate over groups in your data set is a great way to easily extract value right away. For example, you might want to calculate the total amount of money your stores have made by state or the average amount of time someone spends logged into your website by demographic. Typically, with a new data set, you’ll start with these types of analyses to help you gauge what is interesting or unique in your data and what needs a closer look.

The patterns in this chapter are numerical summarizations, inverted index, and counting with counters. They are more straightforward applications of MapReduce than some of the other patterns in this book. This is because grouping data together by a key is the core function of the MapReduce paradigm: all of the keys are grouped together and collected in the reducers. If you emit the fields in the mapper you want to group on as your key, the grouping is all handled by the MapReduce framework for free.

Numerical Summarizations

Pattern Description

The numerical summarizations ...

The best content for your career. Discover unlimited learning on demand for around $1/day.