SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
2.
Objetivos <ul><ul><li>Comprender la necesidad de un sistema de archivos distribuido. </li></ul></ul><ul><ul><li>Comprender la infraestructura sobre la cual se implementa MapReduce. </li></ul></ul><ul><ul><li>Escribir procesamiento de datos usando la abstraccion MapReduce. </li></ul></ul>
3.
<ul><li>Motivation: Large Scale Data Processing </li></ul><ul><li>Many tasks: Process lots of data to produce other data </li></ul><ul><li>Want to use hundreds or thousands of CPUs </li></ul><ul><ul><li>... but this needs to be easy </li></ul></ul><ul><li>MapReduce provides: </li></ul><ul><ul><li>Automatic parallelization and distribution </li></ul></ul><ul><ul><li>Fault-tolerance </li></ul></ul><ul><ul><li>I/O scheduling </li></ul></ul><ul><ul><li>Status and monitoring </li></ul></ul>
4.
<ul><li>Programming model </li></ul><ul><li>Input & Output: each a set of key/value pairs </li></ul><ul><li>Programmer specifies two functions: </li></ul><ul><li> </li></ul><ul><li>map (in_key, in_value) -> </li></ul><ul><li>list(out_key, intermediate_value) </li></ul><ul><li> </li></ul><ul><li>reduce(out_key, list(intermediate_value)) -> list(out_value) </li></ul><ul><li> </li></ul><ul><ul><li>Combines all intermediate values for a particular key </li></ul></ul><ul><ul><li>Produces a set of merged output values (usually just one) </li></ul></ul><ul><li>Inspired by similar primitives in LISP and other languages </li></ul>
6.
Sistema de Archivos Distribuido <ul><ul><li>Permiten representar datos que estan repartidos en un cluster de servidores como una sola entidad logica. </li></ul></ul>
8.
MapReduce <ul><ul><li>Permite procesar los datos que estan en el cluster de manera paralela aprovechando el sistema de archivos distribuido. </li></ul></ul><ul><ul><li>Cada servidor del cluster trata de procesar la parte de los datos que posee localmente. </li></ul></ul><ul><ul><li>Existen dos fases principales en el proceso: Mapeo y Reduccion. </li></ul></ul>
9.
Mapeo <ul><ul><li>El metodo MAP recibe como entrada un par (clave, valor) y su salida es uno o varios pares (clave-i, valor-i). </li></ul></ul><ul><ul><li>Si se tiene un conjunto de archivos de texto que se desea procesar, los pares clave valor de entrada podrian ser (nombre de archivo, datos del archivo). </li></ul></ul>
10.
Reduccion <ul><ul><li>El metodo REDUCE recibe como entrada un par (clave, lista de valores) y la salida es un par (clave, valor). </li></ul></ul><ul><ul><li>La entrada para un REDUCE que cuenta el numero de ocurrencias de cada palabra para un texto seria (palabra, listado con cada una de las cantidades de veces que aparecio esa palabra para cada resultado de salida del mapper) </li></ul></ul>
13.
Implementaciones de MapReduce <ul><ul><li>Apache Hadoop Para distribuir tareas entre los servidores de un cluster </li></ul></ul><ul><ul><li>QT Concurrent Para distribuir tareas entre multiples procesadores. </li></ul></ul>
14.
A mapper with QT Concurrent <ul><li> QMap<QString, int> map(const QString &file) { </li></ul><ul><li> QFile f(file); f.open(QIODevice::ReadOnly); QTextStream textStream(&f); QMap<QString, int> wordCount; while (textStream.atEnd() == false) foreach (QString word, textStream.readLine().split(" ")) wordCount[word] += 1; return wordCount; } </li></ul>
15.
A Reducer with QT Concurrent <ul><li>void reduce(QMap<QString, int> &result, </li></ul><ul><li> const QMap<QString, int> &w) { </li></ul><ul><li> QMapIterator<QString, int> i(w); while (i.hasNext()) { i.next(); result[i.key()] += i.value(); } } </li></ul>
17.
Fuentes MapReduce: Simplified Data Processing on Large Clusters http://labs.google.com/papers/mapreduce.html MapReduce in QT Concurrent http://labs.trolltech.com/blogs/2007/04/26/ mapreduce-in-qt-concurrent/ Apache Hadoop http://hadoop.apache.org/core/
0 likes
Be the first to like this
Views
Total views
2,178
On SlideShare
0
From Embeds
0
Number of Embeds
21
You have now unlocked unlimited access to 20M+ documents!
Unlimited Reading
Learn faster and smarter from top experts
Unlimited Downloading
Download to take your learnings offline and on the go
You also get free access to Scribd!
Instant access to millions of ebooks, audiobooks, magazines, podcasts and more.
Read and listen offline with any device.
Free access to premium services like Tuneln, Mubi and more.