Skip to Content
Data Algorithms
book

Data Algorithms

by Mahmoud Parsian
July 2015
Intermediate to advanced
778 pages
17h 9m
English
O'Reilly Media, Inc.
Content preview from Data Algorithms

Chapter 30. Huge Cache for MapReduce

This chapter will show how to use and read a huge cache (i.e., composed of billions of key-value pairs that cannot fit in a commodity server’s memory) in MapReduce algorithms. The algorithms presented in this chapter are generic enough to be used in any MapReduce paradigms (such as MapReduce/Hadoop and Spark).

There are some MapReduce algorithms that might require access to some huge (i.e., containing billions of records) static reference relational tables. Typically, these reference relational tables do not change for a long period of time, but they are needed in either the map() or reduce() phase of MapReduce programs. One example of such a table is a “position feature” table, which is used for germline1 data type ingestion and variant classification. The position feature table might have the attributes shown in Table 30-1 (a composite key is (chromosome_id, position).

Table 30-1. Attributes of a position feature table
Column name Characteristics
chromosome_id Key-1
position Key-2
feature_id Basic attribute
mrna_feature_id Basic attribute
sequence_data_type_id Basic attribute
mapping Basic attribute

In expressing your solution in the MapReduce paradigm, either in map() or reduce(), given a key=(chromosome_id, position), you want to return a List<String> where each element of the list comprises the remaining attributes {feature_id, mrna_feature_id, sequence_data_type_id, mapping}. For the germline data type, a position ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Algorithms with Spark

Data Algorithms with Spark

Mahmoud Parsian
Graph Algorithms

Graph Algorithms

Mark Needham, Amy E. Hodler
Algorithms and Data Structures for Massive Datasets

Algorithms and Data Structures for Massive Datasets

Dzejla Medjedovic, Emin Tahirovic, Ines Schweigert

Publisher Resources

ISBN: 9781491906170Errata PageSupplemental Content