SlideShare une entreprise Scribd logo
1  sur  51
Tilani Gunawardena
“When the only tool you own is a hammer,
every problem begins to resemble a nail.” -
Abraham Harold Maslow
InputTime
    Chubby
    Bigtable
    GFS
ProcessingTime
    Sawzall
    MapReduce
OutputTime
    Bigtable
    GFS
Large data set(large,dynamic, unwieldy)
Flat but regular structure
Span multiple disks and machines
Bottleneck lies in I/O, not CPUs
Paralyze to improve throughput
Task division and distribution
Keep computation near to data
Tolerance of kinds of failures
Process data records that are present on many
machines.
Distribute the calculation across all the
machines to achieve high throughput.
Two phases for calculation
 -Analysis Phase
 -Aggregation Phase
Five racks of 50-55 working computers each, with four disks per
machine.Such a configuration might have a hundred terabytes
of data to be processed, distributed across some or all of the
machines.
Query is commutative then can process in any order
If Aggregation is commutative and associative then intermediate
values can be grouped arbitrarily or even aggregated in stages
The overall flow of filtering, aggregating, and collating.
Each stage typically involves less data than the previous
Gigabyte to many terabytes of data
Hundreds or even thousands of machines in
parallel
Some executing the query while others
aggregate the results
An analysis may consume months of CPU time,
but with a thousand machines that will only
take a few hours of real time.
system’s design is influenced by two
observations.
   If the querying operations are commutative across
   records, the order in which the records are process
   unimportant
   If the aggregation operations are commutative, the
   order in which the intermediate values are
   processed is unimportant
Input is divided into pieces & processed separately
Sawzall interpreter is instantiated for each piece of
data
Sawzall program operates on each input record
individually
The output of the program for each record is the
intermediate value.
The intermediate value is combined with values
from other records
Input: Set of files that contain records where each
of the records contain one floating-point number.
Output:Number of records, sum of the values and
sum of the squares of the values.

count:            table sum of int;
total:            table sum of float;
sum_of_squares:   table sum of float;
x:                float=input;
emit              count<—1;
emit              total<—x;
emit              sum_of_squares<- x*x;
Protocol Buffers
Google File System
Workqueue
MapReduce
Protocol Buffers are used
-To define the messages communicated between
servers
-To describe the format of permanent records stored
on disk
DDL describes protocol buffers and defines the
content of the messages
Protocol compiler takes the DDL and generates code
to manipulate the protocol buffers
The generated code is compiled and linked with
the application
Protocol buffer types are roughly analogous to C
structs but the DDL has two additional
properties
   A distinguishing integral tag
   An indication of whether a field is necessary or
   optional
The following describes a protocol buffer with two required
fields. Field x has tag 1,and field y has tag 2
         parsed message Point {
         required int32 x = 1;
         required int32 y = 2;
         };
To extend this two-dimensional point, one can add a new,
optional field with a new tag. All existing Points stored on disk
remain readable; they are compatible with the new definition
since the new field is optional.

    parsed message Point {
    required int32 x = 1;
    required int32 y = 2;
    optional string label = 3;
    };
The data sets are often stored in GFS
GFS provides a reliable distributed storage
system
It can grow to petabyte scale by keeping data in
64MB “chunks”
Each chunk is replicated, usually 3 times, on
different machines
stored on disks spread across thousands of
machines
GFS runs as an application-level file system with
a traditional hierarchical naming scheme
Software that handles the scheduling of a job
that runs on a cluster of machines.
It creates a large-scale time sharing system from
an array of computers and their disks.
It schedules jobs, allocates resources,reports
status, and collects the results
MapReduce is a software library for applications
that run on the Workqueue.
Primary Services
   It provides an execution model for programs that
   operate on many data items in parallel.
   It isolates the application from the details of
   running a distributed program,
   When possible it schedules the computations so
   each unit runs on the machine or rack that holds its
   GFS data, reducing the load on the network.
High level language




Software libraries



Scheduling software



 Application file system
Basic types
   Integer (int)
   Floating point (float)
   Time
   Fingerprint (represents an internally computed
   hash of another value)
   Bytes and String
Compound type
   Arrays, Maps and Tuples
A Sawzall program defines the operations to be
performed on a single record of the data
   There is nothing in the language to enable examining
   multiple input records simultaneously
The only output primitive in the language is the
emit statement
Given a set of logs of the submissions to our source code management system, this
  program will show how the rate of submission varies through the week, at one-
  minute resolution:

proto “p4stat.proto”
submitsthroughweek: table sum[minute: int] of count: int;

log: P4ChangelistStats = input;
t: time = log.time; # microseconds
minute: int = minuteof(t)+60*(hourof(t)+24*(dayofweek(t)-1));
emit submitsthroughweek[minute] <- 1;
submitsthroughweek[0] = 27
submitsthroughweek[1] = 31
submitsthroughweek[2] = 52
submitsthroughweek[3] = 41
...
submitsthroughweek[10079] = 34
Frequency of submits to the source code
repository through the week.
List of Aggregators
   Collection
   Sample
   Sum
   Maximum
   Quantile
   Top
   Unique
System operates in a batch-execution style
-User submits a job
-Job runs on a fixed set of files
-User collects the output
 The input format and output destination are given as
 arguments to the command that submits the job.
 The command is called “saw”
 The parameters for saw are as follows
   saw --program code.szl 
   --workqueue testing 
   --input_files /gfs/cluster1/2005-02-0[1-7]/submits.* 
   --destination /gfs/cluster2/$USER/output@100
User collects the data using the following:
dump --source/gfs/cluster2/$USER/output@100 --
format csv

   The program merges the output data and prints the
  final results.
Implementation
 -Sawzall works in the map phase
 -Aggregators work in the reduce phase
Chaining
-The output from a Sawzall job is sent as an
input to another
Task: Process a web document repository to
know for each web domain, which page has the
highest page rank
   proto "document.proto"
   max_pagerank_url:
   table maximum(1) [domain: string] of url: string
   weight pagerank: int;
   doc: Document = input;
   emit max_pagerank_url[domain(doc.url)] <- doc.url
   weight doc.pagerank;
Task: To look at a set of search query logs and
construct a map showing how the queries are
distributed around the globe
    proto "querylog.proto"
    queries_per_degree: table sum[lat: int][lon: int] of int;
    log_record: QueryLogProto = input;
    loc: Location = locationinfo(log_record.ip);
    emit queries_per_degree[int(loc.lat)][int(loc.lon)] <- 1;
It runs on one record at a time
It is routine for a Sawzall job to be executing on
a thousand machines simultaneously, yet the
system requires no explicit communication
between those machines
Sawzall is statically typed
   The main reason is dependability. Sawzall programs can
   consume hours, even months, of CPU time in a single
   run,and a late-arising dynamic type error can be
   expensive.
Handle undefined values
Ex: A division by zero
    Conversion errors
    I/O problems
   Using def() predicate
   Run-time flag is set
Handle logical quantifiers
Similar to C and Pascal
Type-safe scripting language
Code is much shorter than C++
Pure value semantics, no reference types
Statically typed
No exception processing
Compare the single CPU speed of the Sawzall
 interpreter.
 Sawzall is faster than Python, Ruby and Perl. But
 slower than interpreted Java, compiled Java and
 compiled C++
 The following table shows the microbenchmark.
                 Sawzall   Python   Ruby      Perl
  Mandelbrot     12.09s    45.42s   73.59s   38.68s
runtime Factor    1.00      3.75     6.09     3.20
  Fibonacci      11.73s    38.12s   47.18s   75.73s
runtime Factor    1.00      3.24     4.02     6.46
The main measurement is not single-CPU speed.
The main measurement is aggregate system
speed as machines are added to process large
datasets.
Experiment: 450GB sample of compressed
query log data to count the occurrences of
certain words using Sawzall program.
Test run on 50-600 , 2.4GHz Xeon computers
Scales up
    At 600 machines the aggregate throughput was 1.06GB/s of
    compressed data or about 3.2GB/s of raw input
    Additional machines add .98 machine throughput
-The solid line is
elapsed time; the
dashed line is the
product of
machines and
elapsed time.
Why put a language above MapReduce?
   MapReduce is very effective; what’s missing?
Why not just attach an existing language such as Python to MapReduce?

To make programs clearer, more compact, and more expressive
Original motivation :parallelism
     Separating out the aggregators
     provides a model for distributed processing
     Awk or or Python –user have to write the aggregators
Capture the aggregators in the language(& its environment) ->means that
the programmer never has to provide one, unlike when using MapReduce
Sawzall programs tend to be around 10 to 20 times shorter than the
equivalent MapReduce programs in C++ & significantly easier to write
Ability to add domain-specific features, custom debugging and profiling
interfaces,etc
how much data processing it does ?

March 2005.
  Workqueue cluster
      1500 Xeon CPUs
  32,580 Sawzall jobs launched using an average of 220 machines
  each
  18,636 failures
  The jobs read a total of 3.2×1015 bytes
  of data (2.8PB) and wrote 9.9×1012 bytes (9.3TB)
  The average job therefore processed about 100GB
Traditional data processing is done by storing the
information in a relational database and
processing it with SQL queries.
   Sawzall -data sets are usually too large to fit in a
   relational database
   Sawzall is very different from SQL(combining a fairly
   traditional procedural language with an interface to
   efficient aggregators)
   SQL is excellent at database join operations, while
   Sawzall is not
Brook - language for data processing, specifically
graphical image processing ;Brook [3]
Aurora-stream processing system that supports
a (potentially large) set of standing queries on
streams of data ; Aurora [4]
Hancock-stream processing system; Hancock [7]
   concentrates on efficient operation of a single
   thread instead of massive parallelism.
Some of the larger or more complex analyses would be helped by
more aggressive compilation, perhaps to native machine code.
Interface to query an external database
More direct support of join operations
    Some analyses join data from multiple input sources, Joining
    is supported but requires extra chaining steps
A more radical system model
    To eliminate the batch-processing mode entirely
Provide an expressive interface to a novel set of aggregators that
capture many common data processing and data reduction
problems
Ability to write short, clear programs that are guaranteed to
work well on thousands of machines in parallel
     user needs to know nothing about parallel programming;

CPU time is rarely the limiting factor; most programs are small
and spend most of their time in I/O and native run-time code
Scalability-linear growth in performance as we add machines
    Big data sets need lots of machines; it’s gratifying that lots of machines
    can translate into big throughput.
#/bin/bash


limit=100
sum=0
i=0


while [ "$i" -le $limit ]
do
  sum=`expr $sum + $i`
  i=`expr $i + 1`
done


echo $sum


                            50
#define NUMCALC 25
#include <stdio.h>
#include <mpi.h>
int main (int argc, char *argv[])
{ int myrank, sum, n, partial;
    MPI_Status status;
    sum = 0;
    MPI_Init (&argc, &argv);
    MPI_Comm_rank (MPI_COMM_WORLD, &myrank);
    if (myrank == 0)
    { printf ("starting...n");
        for (n=1; n<=NUMCALC; n++)
        { MPI_Recv (&partial, 1, MPI_INT, n, 0, MPI_COMM_WORLD, &status);
            sum += partial;
        }
        printf ("sum is: %dn", sum);
    }
    else
    { for (n=1; n<=4; n++)
        sum += ((myrank-1)*4+n);
        MPI_Send (&sum, 1, MPI_INT, 0, 0, MPI_COMM_WORLD);                  http://digital.cs.usu.edu/~scott/5200_f02/sum.c

    }
    MPI_Finalize();
    return 0;
                                                                                         51
}

Contenu connexe

Tendances

Map reduce and Hadoop on windows
Map reduce and Hadoop on windowsMap reduce and Hadoop on windows
Map reduce and Hadoop on windowsMuhammad Shahid
 
Map reduce presentation
Map reduce presentationMap reduce presentation
Map reduce presentationateeq ateeq
 
MapReduce: Simplified Data Processing on Large Clusters
MapReduce: Simplified Data Processing on Large ClustersMapReduce: Simplified Data Processing on Large Clusters
MapReduce: Simplified Data Processing on Large ClustersAshraf Uddin
 
Hadoop secondary sort and a custom comparator
Hadoop secondary sort and a custom comparatorHadoop secondary sort and a custom comparator
Hadoop secondary sort and a custom comparatorSubhas Kumar Ghosh
 
Hadoop training-in-hyderabad
Hadoop training-in-hyderabadHadoop training-in-hyderabad
Hadoop training-in-hyderabadsreehari orienit
 
Apache Hadoop MapReduce Tutorial
Apache Hadoop MapReduce TutorialApache Hadoop MapReduce Tutorial
Apache Hadoop MapReduce TutorialFarzad Nozarian
 
Scalable Algorithm Design with MapReduce
Scalable Algorithm Design with MapReduceScalable Algorithm Design with MapReduce
Scalable Algorithm Design with MapReducePietro Michiardi
 
Mapreduce - Simplified Data Processing on Large Clusters
Mapreduce - Simplified Data Processing on Large ClustersMapreduce - Simplified Data Processing on Large Clusters
Mapreduce - Simplified Data Processing on Large ClustersAbhishek Singh
 
MapReduce on Zero VM
MapReduce on Zero VM MapReduce on Zero VM
MapReduce on Zero VM Joy Rahman
 
Hadoop & MapReduce
Hadoop & MapReduceHadoop & MapReduce
Hadoop & MapReduceNewvewm
 
An Introduction to MapReduce
An Introduction to MapReduceAn Introduction to MapReduce
An Introduction to MapReduceFrane Bandov
 
MapReduce : Simplified Data Processing on Large Clusters
MapReduce : Simplified Data Processing on Large ClustersMapReduce : Simplified Data Processing on Large Clusters
MapReduce : Simplified Data Processing on Large ClustersAbolfazl Asudeh
 
Mapreduce total order sorting technique
Mapreduce total order sorting techniqueMapreduce total order sorting technique
Mapreduce total order sorting techniqueUday Vakalapudi
 
Hadoop introduction 2
Hadoop introduction 2Hadoop introduction 2
Hadoop introduction 2Tianwei Liu
 

Tendances (20)

Map reduce and Hadoop on windows
Map reduce and Hadoop on windowsMap reduce and Hadoop on windows
Map reduce and Hadoop on windows
 
Map reduce presentation
Map reduce presentationMap reduce presentation
Map reduce presentation
 
MapReduce: Simplified Data Processing on Large Clusters
MapReduce: Simplified Data Processing on Large ClustersMapReduce: Simplified Data Processing on Large Clusters
MapReduce: Simplified Data Processing on Large Clusters
 
Hadoop secondary sort and a custom comparator
Hadoop secondary sort and a custom comparatorHadoop secondary sort and a custom comparator
Hadoop secondary sort and a custom comparator
 
Hadoop training-in-hyderabad
Hadoop training-in-hyderabadHadoop training-in-hyderabad
Hadoop training-in-hyderabad
 
Apache Hadoop MapReduce Tutorial
Apache Hadoop MapReduce TutorialApache Hadoop MapReduce Tutorial
Apache Hadoop MapReduce Tutorial
 
Scalable Algorithm Design with MapReduce
Scalable Algorithm Design with MapReduceScalable Algorithm Design with MapReduce
Scalable Algorithm Design with MapReduce
 
Mapreduce - Simplified Data Processing on Large Clusters
Mapreduce - Simplified Data Processing on Large ClustersMapreduce - Simplified Data Processing on Large Clusters
Mapreduce - Simplified Data Processing on Large Clusters
 
Hadoop - Introduction to mapreduce
Hadoop -  Introduction to mapreduceHadoop -  Introduction to mapreduce
Hadoop - Introduction to mapreduce
 
MapReduce on Zero VM
MapReduce on Zero VM MapReduce on Zero VM
MapReduce on Zero VM
 
The google MapReduce
The google MapReduceThe google MapReduce
The google MapReduce
 
Hadoop & MapReduce
Hadoop & MapReduceHadoop & MapReduce
Hadoop & MapReduce
 
Run time administration
Run time administrationRun time administration
Run time administration
 
Hadoop map reduce v2
Hadoop map reduce v2Hadoop map reduce v2
Hadoop map reduce v2
 
An Introduction to MapReduce
An Introduction to MapReduceAn Introduction to MapReduce
An Introduction to MapReduce
 
Map Reduce
Map ReduceMap Reduce
Map Reduce
 
Chapter 7 Run Time Environment
Chapter 7   Run Time EnvironmentChapter 7   Run Time Environment
Chapter 7 Run Time Environment
 
MapReduce : Simplified Data Processing on Large Clusters
MapReduce : Simplified Data Processing on Large ClustersMapReduce : Simplified Data Processing on Large Clusters
MapReduce : Simplified Data Processing on Large Clusters
 
Mapreduce total order sorting technique
Mapreduce total order sorting techniqueMapreduce total order sorting technique
Mapreduce total order sorting technique
 
Hadoop introduction 2
Hadoop introduction 2Hadoop introduction 2
Hadoop introduction 2
 

En vedette

How to become a google educator and google education trainer
How to become a google educator and google education trainerHow to become a google educator and google education trainer
How to become a google educator and google education trainerRupinder Bedi
 
Exercicio 02
Exercicio 02Exercicio 02
Exercicio 02alicemota
 
New look for GAPPS Admin console-A Comparison of Old and New Interface
New look for GAPPS Admin console-A Comparison of Old and New InterfaceNew look for GAPPS Admin console-A Comparison of Old and New Interface
New look for GAPPS Admin console-A Comparison of Old and New InterfaceRupinder Bedi
 
PDToolkit for Words Their Way
PDToolkit for Words Their WayPDToolkit for Words Their Way
PDToolkit for Words Their Waymbagshaw
 
Becoming a google educator and google education trainer
Becoming a google educator and google education trainerBecoming a google educator and google education trainer
Becoming a google educator and google education trainerRupinder Bedi
 
Pusad solar power plant presentation (rev 7)
Pusad solar power plant presentation  (rev 7)Pusad solar power plant presentation  (rev 7)
Pusad solar power plant presentation (rev 7)California Free Solar
 

En vedette (18)

HadoopDB in Action
HadoopDB in ActionHadoopDB in Action
HadoopDB in Action
 
Pig Experience
Pig ExperiencePig Experience
Pig Experience
 
How to become a google educator and google education trainer
How to become a google educator and google education trainerHow to become a google educator and google education trainer
How to become a google educator and google education trainer
 
Exercicio 02
Exercicio 02Exercicio 02
Exercicio 02
 
New look for GAPPS Admin console-A Comparison of Old and New Interface
New look for GAPPS Admin console-A Comparison of Old and New InterfaceNew look for GAPPS Admin console-A Comparison of Old and New Interface
New look for GAPPS Admin console-A Comparison of Old and New Interface
 
Cheetah:Data Warehouse on Top of MapReduce
Cheetah:Data Warehouse on Top of MapReduceCheetah:Data Warehouse on Top of MapReduce
Cheetah:Data Warehouse on Top of MapReduce
 
PDToolkit for Words Their Way
PDToolkit for Words Their WayPDToolkit for Words Their Way
PDToolkit for Words Their Way
 
MapReduce
MapReduceMapReduce
MapReduce
 
Ingleeeees
IngleeeeesIngleeeees
Ingleeeees
 
Hierachical clustering
Hierachical clusteringHierachical clustering
Hierachical clustering
 
Covering algorithm
Covering algorithmCovering algorithm
Covering algorithm
 
Becoming a google educator and google education trainer
Becoming a google educator and google education trainerBecoming a google educator and google education trainer
Becoming a google educator and google education trainer
 
evaluation and credibility-Part 1
evaluation and credibility-Part 1evaluation and credibility-Part 1
evaluation and credibility-Part 1
 
Machine Learning and Data Mining
Machine Learning and Data MiningMachine Learning and Data Mining
Machine Learning and Data Mining
 
Decision tree
Decision treeDecision tree
Decision tree
 
K Nearest Neighbors
K Nearest NeighborsK Nearest Neighbors
K Nearest Neighbors
 
Pusad solar power plant presentation (rev 7)
Pusad solar power plant presentation  (rev 7)Pusad solar power plant presentation  (rev 7)
Pusad solar power plant presentation (rev 7)
 
Big data in telecom
Big data in telecomBig data in telecom
Big data in telecom
 

Similaire à Interpreting the Data:Parallel Analysis with Sawzall

Software architecture for data applications
Software architecture for data applicationsSoftware architecture for data applications
Software architecture for data applicationsDing Li
 
Migration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming ModelsMigration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming ModelsZvi Avraham
 
Moving Towards a Streaming Architecture
Moving Towards a Streaming ArchitectureMoving Towards a Streaming Architecture
Moving Towards a Streaming ArchitectureGabriele Modena
 
Big data & Hadoop
Big data & HadoopBig data & Hadoop
Big data & HadoopAhmed Gamil
 
Seminar Presentation Hadoop
Seminar Presentation HadoopSeminar Presentation Hadoop
Seminar Presentation HadoopVarun Narang
 
Map reduce in Hadoop
Map reduce in HadoopMap reduce in Hadoop
Map reduce in Hadoopishan0019
 
Scaling Application on High Performance Computing Clusters and Analysis of th...
Scaling Application on High Performance Computing Clusters and Analysis of th...Scaling Application on High Performance Computing Clusters and Analysis of th...
Scaling Application on High Performance Computing Clusters and Analysis of th...Rusif Eyvazli
 
Hadoop online-training
Hadoop online-trainingHadoop online-training
Hadoop online-trainingGeohedrick
 
Hadoop bigdata overview
Hadoop bigdata overviewHadoop bigdata overview
Hadoop bigdata overviewharithakannan
 
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...Yahoo Developer Network
 
Hadoop and Mapreduce Introduction
Hadoop and Mapreduce IntroductionHadoop and Mapreduce Introduction
Hadoop and Mapreduce Introductionrajsandhu1989
 
Hadoop Network Performance profile
Hadoop Network Performance profileHadoop Network Performance profile
Hadoop Network Performance profilepramodbiligiri
 
System models for distributed and cloud computing
System models for distributed and cloud computingSystem models for distributed and cloud computing
System models for distributed and cloud computingpurplesea
 
Taking Spark Streaming to the Next Level with Datasets and DataFrames
Taking Spark Streaming to the Next Level with Datasets and DataFramesTaking Spark Streaming to the Next Level with Datasets and DataFrames
Taking Spark Streaming to the Next Level with Datasets and DataFramesDatabricks
 
Hadoop and HBase experiences in perf log project
Hadoop and HBase experiences in perf log projectHadoop and HBase experiences in perf log project
Hadoop and HBase experiences in perf log projectMao Geng
 
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop ClustersHDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop ClustersXiao Qin
 
Hadoop Tutorial.ppt
Hadoop Tutorial.pptHadoop Tutorial.ppt
Hadoop Tutorial.pptSathish24111
 

Similaire à Interpreting the Data:Parallel Analysis with Sawzall (20)

Hadoop
HadoopHadoop
Hadoop
 
Software architecture for data applications
Software architecture for data applicationsSoftware architecture for data applications
Software architecture for data applications
 
Migration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming ModelsMigration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming Models
 
Moving Towards a Streaming Architecture
Moving Towards a Streaming ArchitectureMoving Towards a Streaming Architecture
Moving Towards a Streaming Architecture
 
Big data & Hadoop
Big data & HadoopBig data & Hadoop
Big data & Hadoop
 
Seminar Presentation Hadoop
Seminar Presentation HadoopSeminar Presentation Hadoop
Seminar Presentation Hadoop
 
Map reduce in Hadoop
Map reduce in HadoopMap reduce in Hadoop
Map reduce in Hadoop
 
Scaling Application on High Performance Computing Clusters and Analysis of th...
Scaling Application on High Performance Computing Clusters and Analysis of th...Scaling Application on High Performance Computing Clusters and Analysis of th...
Scaling Application on High Performance Computing Clusters and Analysis of th...
 
Hadoop online-training
Hadoop online-trainingHadoop online-training
Hadoop online-training
 
Hadoop bigdata overview
Hadoop bigdata overviewHadoop bigdata overview
Hadoop bigdata overview
 
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
 
Hadoop and Mapreduce Introduction
Hadoop and Mapreduce IntroductionHadoop and Mapreduce Introduction
Hadoop and Mapreduce Introduction
 
Hadoop Network Performance profile
Hadoop Network Performance profileHadoop Network Performance profile
Hadoop Network Performance profile
 
System models for distributed and cloud computing
System models for distributed and cloud computingSystem models for distributed and cloud computing
System models for distributed and cloud computing
 
Taking Spark Streaming to the Next Level with Datasets and DataFrames
Taking Spark Streaming to the Next Level with Datasets and DataFramesTaking Spark Streaming to the Next Level with Datasets and DataFrames
Taking Spark Streaming to the Next Level with Datasets and DataFrames
 
Hadoop and HBase experiences in perf log project
Hadoop and HBase experiences in perf log projectHadoop and HBase experiences in perf log project
Hadoop and HBase experiences in perf log project
 
GCF
GCFGCF
GCF
 
Hadoop tutorial
Hadoop tutorialHadoop tutorial
Hadoop tutorial
 
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop ClustersHDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters
HDFS-HC: A Data Placement Module for Heterogeneous Hadoop Clusters
 
Hadoop Tutorial.ppt
Hadoop Tutorial.pptHadoop Tutorial.ppt
Hadoop Tutorial.ppt
 

Plus de Tilani Gunawardena PhD(UNIBAS), BSc(Pera), FHEA(UK), CEng, MIESL (12)

BlockChain.pptx
BlockChain.pptxBlockChain.pptx
BlockChain.pptx
 
Introduction to data mining and machine learning
Introduction to data mining and machine learningIntroduction to data mining and machine learning
Introduction to data mining and machine learning
 
Introduction to cloud computing
Introduction to cloud computingIntroduction to cloud computing
Introduction to cloud computing
 
Data analytics
Data analyticsData analytics
Data analytics
 
Hadoop Eco system
Hadoop Eco systemHadoop Eco system
Hadoop Eco system
 
Parallel Computing on the GPU
Parallel Computing on the GPUParallel Computing on the GPU
Parallel Computing on the GPU
 
evaluation and credibility-Part 2
evaluation and credibility-Part 2evaluation and credibility-Part 2
evaluation and credibility-Part 2
 
kmean clustering
kmean clusteringkmean clustering
kmean clustering
 
Assosiate rule mining
Assosiate rule miningAssosiate rule mining
Assosiate rule mining
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Efficient Parallel Set-Similarity Joins Using MapReduce
 Efficient Parallel Set-Similarity Joins Using MapReduce Efficient Parallel Set-Similarity Joins Using MapReduce
Efficient Parallel Set-Similarity Joins Using MapReduce
 
Hadoop DB
Hadoop DBHadoop DB
Hadoop DB
 

Dernier

9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 

Dernier (20)

9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 

Interpreting the Data:Parallel Analysis with Sawzall

  • 2.
  • 3. “When the only tool you own is a hammer, every problem begins to resemble a nail.” - Abraham Harold Maslow
  • 4. InputTime Chubby Bigtable GFS ProcessingTime Sawzall MapReduce OutputTime Bigtable GFS
  • 5. Large data set(large,dynamic, unwieldy) Flat but regular structure Span multiple disks and machines Bottleneck lies in I/O, not CPUs Paralyze to improve throughput Task division and distribution Keep computation near to data Tolerance of kinds of failures
  • 6. Process data records that are present on many machines. Distribute the calculation across all the machines to achieve high throughput. Two phases for calculation -Analysis Phase -Aggregation Phase
  • 7. Five racks of 50-55 working computers each, with four disks per machine.Such a configuration might have a hundred terabytes of data to be processed, distributed across some or all of the machines.
  • 8. Query is commutative then can process in any order If Aggregation is commutative and associative then intermediate values can be grouped arbitrarily or even aggregated in stages The overall flow of filtering, aggregating, and collating. Each stage typically involves less data than the previous
  • 9. Gigabyte to many terabytes of data Hundreds or even thousands of machines in parallel Some executing the query while others aggregate the results An analysis may consume months of CPU time, but with a thousand machines that will only take a few hours of real time.
  • 10. system’s design is influenced by two observations. If the querying operations are commutative across records, the order in which the records are process unimportant If the aggregation operations are commutative, the order in which the intermediate values are processed is unimportant
  • 11. Input is divided into pieces & processed separately Sawzall interpreter is instantiated for each piece of data Sawzall program operates on each input record individually The output of the program for each record is the intermediate value. The intermediate value is combined with values from other records
  • 12. Input: Set of files that contain records where each of the records contain one floating-point number. Output:Number of records, sum of the values and sum of the squares of the values. count: table sum of int; total: table sum of float; sum_of_squares: table sum of float; x: float=input; emit count<—1; emit total<—x; emit sum_of_squares<- x*x;
  • 13. Protocol Buffers Google File System Workqueue MapReduce
  • 14. Protocol Buffers are used -To define the messages communicated between servers -To describe the format of permanent records stored on disk DDL describes protocol buffers and defines the content of the messages Protocol compiler takes the DDL and generates code to manipulate the protocol buffers
  • 15. The generated code is compiled and linked with the application Protocol buffer types are roughly analogous to C structs but the DDL has two additional properties A distinguishing integral tag An indication of whether a field is necessary or optional
  • 16. The following describes a protocol buffer with two required fields. Field x has tag 1,and field y has tag 2 parsed message Point { required int32 x = 1; required int32 y = 2; }; To extend this two-dimensional point, one can add a new, optional field with a new tag. All existing Points stored on disk remain readable; they are compatible with the new definition since the new field is optional. parsed message Point { required int32 x = 1; required int32 y = 2; optional string label = 3; };
  • 17. The data sets are often stored in GFS GFS provides a reliable distributed storage system It can grow to petabyte scale by keeping data in 64MB “chunks” Each chunk is replicated, usually 3 times, on different machines stored on disks spread across thousands of machines GFS runs as an application-level file system with a traditional hierarchical naming scheme
  • 18. Software that handles the scheduling of a job that runs on a cluster of machines. It creates a large-scale time sharing system from an array of computers and their disks. It schedules jobs, allocates resources,reports status, and collects the results
  • 19. MapReduce is a software library for applications that run on the Workqueue. Primary Services It provides an execution model for programs that operate on many data items in parallel. It isolates the application from the details of running a distributed program, When possible it schedules the computations so each unit runs on the machine or rack that holds its GFS data, reducing the load on the network.
  • 20. High level language Software libraries Scheduling software Application file system
  • 21. Basic types Integer (int) Floating point (float) Time Fingerprint (represents an internally computed hash of another value) Bytes and String Compound type Arrays, Maps and Tuples
  • 22. A Sawzall program defines the operations to be performed on a single record of the data There is nothing in the language to enable examining multiple input records simultaneously The only output primitive in the language is the emit statement
  • 23. Given a set of logs of the submissions to our source code management system, this program will show how the rate of submission varies through the week, at one- minute resolution: proto “p4stat.proto” submitsthroughweek: table sum[minute: int] of count: int; log: P4ChangelistStats = input; t: time = log.time; # microseconds minute: int = minuteof(t)+60*(hourof(t)+24*(dayofweek(t)-1)); emit submitsthroughweek[minute] <- 1; submitsthroughweek[0] = 27 submitsthroughweek[1] = 31 submitsthroughweek[2] = 52 submitsthroughweek[3] = 41 ... submitsthroughweek[10079] = 34
  • 24. Frequency of submits to the source code repository through the week.
  • 25. List of Aggregators Collection Sample Sum Maximum Quantile Top Unique
  • 26. System operates in a batch-execution style -User submits a job -Job runs on a fixed set of files -User collects the output The input format and output destination are given as arguments to the command that submits the job. The command is called “saw” The parameters for saw are as follows saw --program code.szl --workqueue testing --input_files /gfs/cluster1/2005-02-0[1-7]/submits.* --destination /gfs/cluster2/$USER/output@100
  • 27. User collects the data using the following: dump --source/gfs/cluster2/$USER/output@100 -- format csv The program merges the output data and prints the final results.
  • 28. Implementation -Sawzall works in the map phase -Aggregators work in the reduce phase
  • 29. Chaining -The output from a Sawzall job is sent as an input to another
  • 30. Task: Process a web document repository to know for each web domain, which page has the highest page rank proto "document.proto" max_pagerank_url: table maximum(1) [domain: string] of url: string weight pagerank: int; doc: Document = input; emit max_pagerank_url[domain(doc.url)] <- doc.url weight doc.pagerank;
  • 31. Task: To look at a set of search query logs and construct a map showing how the queries are distributed around the globe proto "querylog.proto" queries_per_degree: table sum[lat: int][lon: int] of int; log_record: QueryLogProto = input; loc: Location = locationinfo(log_record.ip); emit queries_per_degree[int(loc.lat)][int(loc.lon)] <- 1;
  • 32.
  • 33. It runs on one record at a time It is routine for a Sawzall job to be executing on a thousand machines simultaneously, yet the system requires no explicit communication between those machines
  • 34. Sawzall is statically typed The main reason is dependability. Sawzall programs can consume hours, even months, of CPU time in a single run,and a late-arising dynamic type error can be expensive. Handle undefined values Ex: A division by zero Conversion errors I/O problems Using def() predicate Run-time flag is set Handle logical quantifiers
  • 35. Similar to C and Pascal Type-safe scripting language Code is much shorter than C++ Pure value semantics, no reference types Statically typed No exception processing
  • 36. Compare the single CPU speed of the Sawzall interpreter. Sawzall is faster than Python, Ruby and Perl. But slower than interpreted Java, compiled Java and compiled C++ The following table shows the microbenchmark. Sawzall Python Ruby Perl Mandelbrot 12.09s 45.42s 73.59s 38.68s runtime Factor 1.00 3.75 6.09 3.20 Fibonacci 11.73s 38.12s 47.18s 75.73s runtime Factor 1.00 3.24 4.02 6.46
  • 37. The main measurement is not single-CPU speed. The main measurement is aggregate system speed as machines are added to process large datasets. Experiment: 450GB sample of compressed query log data to count the occurrences of certain words using Sawzall program.
  • 38. Test run on 50-600 , 2.4GHz Xeon computers Scales up At 600 machines the aggregate throughput was 1.06GB/s of compressed data or about 3.2GB/s of raw input Additional machines add .98 machine throughput
  • 39. -The solid line is elapsed time; the dashed line is the product of machines and elapsed time.
  • 40. Why put a language above MapReduce? MapReduce is very effective; what’s missing? Why not just attach an existing language such as Python to MapReduce? To make programs clearer, more compact, and more expressive Original motivation :parallelism Separating out the aggregators provides a model for distributed processing Awk or or Python –user have to write the aggregators Capture the aggregators in the language(& its environment) ->means that the programmer never has to provide one, unlike when using MapReduce Sawzall programs tend to be around 10 to 20 times shorter than the equivalent MapReduce programs in C++ & significantly easier to write Ability to add domain-specific features, custom debugging and profiling interfaces,etc
  • 41. how much data processing it does ? March 2005. Workqueue cluster 1500 Xeon CPUs 32,580 Sawzall jobs launched using an average of 220 machines each 18,636 failures The jobs read a total of 3.2×1015 bytes of data (2.8PB) and wrote 9.9×1012 bytes (9.3TB) The average job therefore processed about 100GB
  • 42. Traditional data processing is done by storing the information in a relational database and processing it with SQL queries. Sawzall -data sets are usually too large to fit in a relational database Sawzall is very different from SQL(combining a fairly traditional procedural language with an interface to efficient aggregators) SQL is excellent at database join operations, while Sawzall is not Brook - language for data processing, specifically graphical image processing ;Brook [3]
  • 43. Aurora-stream processing system that supports a (potentially large) set of standing queries on streams of data ; Aurora [4] Hancock-stream processing system; Hancock [7] concentrates on efficient operation of a single thread instead of massive parallelism.
  • 44. Some of the larger or more complex analyses would be helped by more aggressive compilation, perhaps to native machine code. Interface to query an external database More direct support of join operations Some analyses join data from multiple input sources, Joining is supported but requires extra chaining steps A more radical system model To eliminate the batch-processing mode entirely
  • 45. Provide an expressive interface to a novel set of aggregators that capture many common data processing and data reduction problems Ability to write short, clear programs that are guaranteed to work well on thousands of machines in parallel user needs to know nothing about parallel programming; CPU time is rarely the limiting factor; most programs are small and spend most of their time in I/O and native run-time code Scalability-linear growth in performance as we add machines Big data sets need lots of machines; it’s gratifying that lots of machines can translate into big throughput.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50. #/bin/bash limit=100 sum=0 i=0 while [ "$i" -le $limit ] do sum=`expr $sum + $i` i=`expr $i + 1` done echo $sum 50
  • 51. #define NUMCALC 25 #include <stdio.h> #include <mpi.h> int main (int argc, char *argv[]) { int myrank, sum, n, partial; MPI_Status status; sum = 0; MPI_Init (&argc, &argv); MPI_Comm_rank (MPI_COMM_WORLD, &myrank); if (myrank == 0) { printf ("starting...n"); for (n=1; n<=NUMCALC; n++) { MPI_Recv (&partial, 1, MPI_INT, n, 0, MPI_COMM_WORLD, &status); sum += partial; } printf ("sum is: %dn", sum); } else { for (n=1; n<=4; n++) sum += ((myrank-1)*4+n); MPI_Send (&sum, 1, MPI_INT, 0, 0, MPI_COMM_WORLD); http://digital.cs.usu.edu/~scott/5200_f02/sum.c } MPI_Finalize(); return 0; 51 }

Notes de l'éditeur

  1. Sawzall is an interpreted, procedural, domain-specific programming language , used specifically by Google , to handle huge quantities of data.Assume certain things about the problem spaceHide details about:The machines that are to be usedHow the machines are coordinatedHow the machines exchanges dataTo ease implementationRestrict the data typesRestrict the control structuresRun native code on executing target
  2. American psychologist and philosopher
  3. 5
  4. Awk and Python are not panaceas; for instance, they have no inherent facilities for processing data on multiple machinesThe analysis in the first phase is expressed in anew procedural programming language that executes one record at a time, in isolation, to calculatequery results for each record. The second phase is restricted to a set of predefined aggregatorsthat process the intermediate results generated by the first phase.querying operations are commutative across records, the order in which the records areprocessed is unimportant. We can therefore work through the input in arbitrary order.
  5. Five racks of 50-55 working computers each, with four disks per machine.Such a configuration might have a hundred terabytes of data to be processed, distributed across some or all of the machines.
  6. Evaluate each record individuallyAssociative (A+B)+C=A+(B+C)
  7. Few line codeVery high throughput
  8. MethodologyAggregators-collate &amp; reduce the intermediate values to create the final resultsIn a typical run, the majority of machines will run Sawzall and a smaller fraction will run the aggregators
  9. The first three lines declare the aggregators count, total, and sum of squaresconverts the input record from its external representation into a native floating-point number, whichis stored in a local variable x.aggregators are called tables in Sawzall
  10. DDL-Data Deecription Language----definingdata structures, especially database schemas.
  11. An integral tag to identify a field in binary representation.
  12. Example
  13. Each chunk is replicated, usually 3 times, ondifferent machines so GFS can recover seamlessly from disk or machine failure.
  14. The Workqueue is similar to several other systems such as CondorWe often overlay a Workqueue cluster and a GFS cluster on the same set of machinesSince GFS is a storage system,its CPUs are often lightly loaded, and the free computing cycles can be used to run Workqueuejobs.
  15. On a thousand-machine cluster, a MapReduceimplementation can sort a terabyte of data at an aggregate rate of a gigabyte per secondOur data processing system is built on top of MapReduce
  16. Our data processing system is built on top of MapReduce
  17. Sawzall, the resulting code is much simpler and shorter—by afactor of ten or more—than the corresponding C++ code in MapReduce.The syntax of statements and expressions is borrowed largely from C; for loops, while loops, ifstatements and so on take their familiar formThe time type has microsecond resolution and the libraries include convenient functionsfor decomposing and manipulating these valuesThe fingerprint type represents aninternally-computed hash of another value, which makes it easy to construct data structures suchas aggregators indexed by the fingerprint of a datuminteger - a 64-bit signed valuefloat-a doubleprecision IEEE valuespecial integer-like types called time and fingerprintbytes, similar to a C array of unsigned charstring, which is defined to hold characters from the Unicode character setThere is no “character” type;Arrays areindexed by integer values, while maps are like associative arrays or Python dictionaries and maybe indexed by any type, with the indices unordered and the storage for the elements created ondemand. Finally, tuples represent arbitrary groupings of data, like a C struct or Pascal record. Atypedef-like mechanism allows any type to be given a shorthand name
  18. Although at the statement level Sawzall is a fairly ordinary language, it has two very unusualfeatures, both in some sense outside the language itself:Emit :which sends data to an external aggregator that gathers the results from each record and correlates and processes theresult.
  19. take the input variable,parse it into a data structure by a conversion operation,examine the data, and emit some valuesGiven a set of logs of the submissions to our sourcecode management system, this program will show how the rate of submission varies through theweek, at one-minute resolution:
  20. Occasionally, ideas arise for new aggregators to be supported by Sawzall. Adding new aggregatorsis fairly easy, although not trivial.
  21. The command is called saw and its basic parameters define the name of the Sawzall program to berun, a pattern that matches the names of the files that hold the data records to be processed, and aset of files to receive the output. A typical job might be instantiated like this:
  22. Roughly speaking, which is the most linked-to page?
  23. Query distribution.The output of this program is an array of values suitable for creating a map
  24. This means it has no memory of other records it has processed (except through values emitted to the aggregators, outside the language).
  25. Sawzall does not provide any form of exception processingA predicate, def(), can be used to test if a value is defined
  26. Interpreted LanguageLimited by I/O boundMandelbrot set, to measure basic arithmetic and loop performancerecursive functionStill slower than JavaSawzall is about 1.6times slower than interpreted Java, 21 times slower than compiled Java, and 51 times slower thancompiled C++
  27. The key performance metric for the system is not the single-machine speedhow the speed scales as we add machines when processing a large data set
  28. Performance scales well as we add machines
  29. Sawzall has become one of the most widely used programming languages at Google.Most Sawzall programs are of modest size, but the largest are several thousand lines long and generate dozens of multi-dimensional tables in a single run.