SlideShare a Scribd company logo
1 of 114
Download to read offline
Online Aggregation for Large
MapReduce Jobs
Niketan Pansare1
, Vinayak Borkar2
,
Chris Jermaine1
, Tyson Condie3
1
Rice University, 2
UC Irvine, 3
Yahoo! Research
2
Outline
 Motivation
 Implementation
 Experiments
 Conclusion
3
Outline
 Motivation
 Implementation
 Experiments
 Conclusion
4
OLA example
select avg(stock_price) from nasdaq_db where company = 'xyz';
(Note: final answer for this query is 1000)
5
OLA example
select avg(stock_price) from nasdaq_db where company = 'xyz';
After 1 second,
 Conventional Database:
 With OLA extension:
 Output range estimate: [0, 2000 ] with 95% probability
6
OLA example
select avg(stock_price) from nasdaq_db where company = 'xyz';
After 2 minutes,
 Conventional Database:
 With OLA extension:
 Output range estimate: [900, 1100 ] with 95% probability
7
OLA example
select avg(stock_price) from nasdaq_db where company = 'xyz';
After 4 minutes,
 Conventional Database:
 With OLA extension:
 Output range estimate: [950, 1040 ] with 95% probability
8
OLA example
select avg(stock_price) from nasdaq_db where company = 'xyz';
After 6 minutes,
 Conventional Database:
 With OLA extension:
 Output range estimate: [990, 1010 ] with 95% probability
9
OLA example
select avg(stock_price) from nasdaq_db where company = 'xyz';
After 10 minutes,
 Conventional Database:
 With OLA extension:
 Output range estimate: [995, 1005 ] with 95% probability
10
OLA example
select avg(stock_price) from nasdaq_db where company = 'xyz';
After 30 minutes,
 Conventional Database:
 With OLA extension:
 Output range estimate: [999, 1001.5 ] with 95% probability
11
OLA example
select avg(stock_price) from nasdaq_db where company = 'xyz';
After 2 hours,
 Conventional Database:
 Output final answer: 1000
 With OLA extension:
 Output final answer: 1000
12
Benefit of OLA
 If acceptably accurate answer reached quickly, the query can
be aborted
After 6 minutes,
 Conventional Database:
 With OLA extension:
 Output range estimate: [990, 1015 ] with 95% probability
STOP EARLY !!!
13
Why Stop Early ?
 Save human time (1 hour 54 minutes)
 'Answer 1000' v/s 'Estimate 1002.5'
- For exploratory apps
- Inaccuracies in ETL process
14
Why Stop Early ?
 Save human time (1 hour 54 minutes)
 'Answer 1000' v/s 'Estimate 1002.5'
- For exploratory apps
- Inaccuracies in ETL process
 Save machine time → Cost ↓
15
Why Stop Early ?
 Save human time (1 hour 54 minutes)
 'Answer 1000' v/s 'Estimate 1002.5'
- For exploratory apps
- Inaccuracies in ETL process
 Save machine time → Cost ↓
 Very important when dealing with large data
16
Why Stop Early ?
 Save human time (1 hour 54 minutes)
 'Answer 1000' v/s 'Estimate 1002.5'
- For exploratory apps
- Inaccuracies in ETL process
 Save machine time → Cost ↓
 Very important when dealing with large data
Online Aggregation
- Introduced in 1997
- Significant research impact (606
citations)
- ACM SIGMOD Test of Time Award
But, limited commercial impact
- Database market (self-managed)
17
Self-managed DB → Cloud
 Cost model
 In Self-managed DB: costs are fixed
 In Cloud: You pay for amount of hardware used
- Less resources → Less cost
- 10 node cluster: 1h 54min → save $12.92/query on EC2
 User needs to justify the cost to the organization
18
Self-managed DB → Cloud
 Cost model
 In Self-managed DB: costs are fixed
 In Cloud: You pay for amount of hardware used
- Less resources → Less cost
- 10 node cluster: 1h 54min → save $12.92/query on EC2
 User needs to justify the cost to the organization
 Modifiying engine to support randomization
 Traditional DB: Notoriously difficult
 Cloud: Much simpler
19
Self-managed DB → Cloud
 Cost model
 In Self-managed DB: costs are fixed
 In Cloud: You pay for amount of hardware used
- Less resources → Less cost
- 10 node cluster: 1h 54min → save $12.92/query on EC2
 User needs to justify the cost to the organization
 Modifiying engine to support randomization
 Traditional DB: Notoriously difficult
 Cloud: Much simpler
 Therefore, OLA for cloud is an interesting problem
20
Extend existing approaches
 OLA over single machine
 OLA over multiple machine
 Why it won't work ?
 How do we deal with those issues ?
21
Extend existing approaches
 OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 OLA over multiple machines
 Why it won't work ?
 How do we deal with those issues ?
22
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Note: True answer = 55
5, 9
7, 4, 2
8, 3
1, 10, 6
23
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values 5, 9
7, 4, 2
8, 3
1, 10, 6
24
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {}
Estimate = Not available
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2
25
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {}
Estimate = Not available
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2
26
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {}
Estimate = Not available
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2
27
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {13}
Estimate = 13 * 4 / 1 = 52
7, 4, 2
5, 9
7, 4, 2
8, 3
1, 10, 6
28
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {13}
Estimate = 13 * 4 / 1 = 52
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2 8, 3
29
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {13}
Estimate = 13 * 4 / 1 = 52
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2 8, 3
30
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {13, 11}
Estimate = (13 + 11) * 4 / 2 = 48
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2 8, 3
31
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {13, 11}
Estimate = (13 + 11) * 4 / 2 = 48
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2 8, 3
32
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {13, 11}
Estimate = (13 + 11) * 4 / 2 = 48
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2 8, 3 5, 9
33
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {13, 11}
Estimate = (13 + 11) * 4 / 2 = 48
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2 8, 3 5, 9
34
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {13, 11, 14}
Estimate = (13 + 11 + 14) * 4 / 3 = 50.67
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2 8, 3 5, 9
35
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {13, 11, 14}
Estimate = (13 + 11 + 14) * 4 / 3 = 50.67
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2 8, 3 5, 9 1, 10, 6
36
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {13, 11, 14}
Estimate = (13 + 11 + 14) * 4 / 3 = 50.67
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2 8, 3 5, 9 1, 10, 6
37
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {13, 11, 14}
Estimate = (13 + 11 + 14) * 4 / 3 = 50.67
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2 8, 3 5, 9 1, 10, 6
38
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {13, 11, 14}
Estimate = (13 + 11 + 14) * 4 / 3 = 50.67
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2 8, 3 5, 9 1, 10, 6
39
OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 Example: Find SUM of below values
Sample = {13, 11, 14, 17}
Estimate = (13 + 11 + 14 + 17) * 4 / 4 = 55
5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2 8, 3 5, 9 1, 10, 6
40
Extend existing approaches
 OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
 Blocks arrive in random order
 OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Why it won't work ?
 How do we deal with those issues ?
41
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
So, instead of
 Example: Find SUM of below values 5, 9
7, 4, 2
8, 3
1, 10, 6
7, 4, 2 8, 3 5, 9 1, 10, 6
42
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
1, 10, 6
7, 4, 2 8, 3 5, 9 1, 10, 6
5, 9
8, 3
7, 4, 2
X axis = Processing Time
43
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
 Blocks that take
 long time to process = RED
 Short time to process = Green
7, 4, 2 8, 3 5, 9 1, 10, 6
44
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
Arrows = Random Time Instances (Polling blocks)
7, 4, 2 8, 3 5, 9 1, 10, 6
45
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
7, 4, 2 8, 3 5, 9 1, 10, 6
46
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
7, 4, 2 8, 3 5, 9 1, 10, 6
47
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
7, 4, 2 8, 3 5, 9 1, 10, 6
48
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
7, 4, 2 8, 3 5, 9 1, 10, 6
49
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
7, 4, 2 8, 3 5, 9 1, 10, 6
50
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
7, 4, 2 8, 3 5, 9 1, 10, 6
51
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
7, 4, 2 8, 3 5, 9 1, 10, 6
52
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
7, 4, 2 8, 3 5, 9 1, 10, 6
53
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
7, 4, 2 8, 3 5, 9 1, 10, 6
54
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
Notice, there are more arrows on red region than green region
7, 4, 2 8, 3 5, 9 1, 10, 6
55
OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Example: Find SUM of below values
Notice, there are more arrows on red region than green region
Inspection Paradox: At any random time t, (stochastically) you
will be processing those blocks that take long time
7, 4, 2 8, 3 5, 9 1, 10, 6
56
Extend existing approaches
 OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
- Arrive in random order
 OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Why it won't work ?
 How do we deal with those issues ?
57
Why won't previous approach work ?
 Inspection paradox → At the time of estimation, processing
longer blocks
 Possible: correlation between processing time and value
 Eg: count query
58
Why won't previous approach work ?
 Inspection paradox → At the time of estimation, processing
longer blocks
 Possible: correlation between processing time and value
 Eg: count query
 Biased estimates → current techniques won't work
59
Why won't previous approach work ?
 Inspection paradox → At the time of estimation, processing
longer blocks
 Possible: correlation between processing time and value
 Eg: count query
 Biased estimates → current techniques won't work
This effect is found experimentally
in the paper: 'MapReduce Online'
60
Why won't previous approach work ?
 Inspection paradox → At the time of estimation, processing
longer blocks
 Possible: correlation between processing time and value
 Eg: count query
 Biased estimates → current techniques won't work
 Therefore, need to deal with inspection paradox in principled
fashion
61
Extend existing approaches
 OLA over single machine
 Confidence interval found using classical sampling theory
 Tuples are bundled into blocks
- Arrive in random order
 OLA over multiple machines
 Blocks → Non-uniform → Size, Locality, Machine, Network
 Processing time for block can be large and highly variable
 Why it won't work ?
 How do we deal with those issues ?
62
How do we deal with Inspection Paradox
 Capture timing information (i.e. processing time of block)
 Along with values
 Instead of using classical sampling theory, we output estimates
using bayesian model that:
 Allows for correlation between processing time and values
 And also takes into account the processing time of current
block
63
Outline
 Motivation
 Implementation
 Experiments
 Conclusion
64
Implementation Overview
 Framework for distributed systems: MapReduce
 Hadoop
- Staged processing → Online
 Hyracks (developed at UC Irvine)
- Pipelining → ”Online”
- Architecture (and API) similar to Hadoop
- http://code.google.com/p/hyracks/
 For estimates of ”Aggregation”,
 2 modifications to MapReduce (Hyracks)
 Bayesian Estimator
65
Implementation Overview
 Framework for distributed systems: MapReduce
 Hadoop
- Staged processing → Online
 Hyracks (developed at UC Irvine)
- Pipelining → ”Online”
- Architecture (and API) similar to Hadoop
- http://code.google.com/p/hyracks/
 For estimates of ”Aggregation”,
 2 modifications to MapReduce (Hyracks)
 Bayesian Estimator
66
Implementation Overview
 Framework for distributed systems: MapReduce
 Hadoop
- Staged processing → Online
 Hyracks (developed at UC Irvine)
- Pipelining → ”Online”
- Architecture (and API) similar to Hadoop
- http://code.google.com/p/hyracks/
 For estimates of ”Aggregation”,
 2 modifications to MapReduce (Hyracks)
 Bayesian Estimator
67
Modifications to MapReduce (Hyracks)
 Master
 Maintains random ordering of blocks
- Logical not physical queue
 Assigns block from head of queue
 Block comes to head of queue → Timer starts (processing
time)
 Two intermediates set of files
 Data file → Values
 Metadata file → Timing information
 Shuffle phase of reducer
68
Modifications to MapReduce (Hyracks)
Client Master
select sum(stock_price) from nasdaq_db group by company;
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
69
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 0
70
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 1
Blk 1 Blk 2 Blk 3 Blk 4 Blk 5 Blk 6 Blk 7
Master maintains a logical
queue of the blocks
71
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 1
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Master randomizes the
queue
72
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 2
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Master forks workers
Worker 1
Worker 2
73
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 3
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Workers request for blocks
Worker 1
Worker 2
74
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 4
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Masters reads head of
queue and assigns it to
first worker
Worker 1
Worker 2
Blk6
75
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 5
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Worker1 starts reading
Blk6Worker 1
Worker 2
Blk6
76
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 6
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Assigns Blk5 to Worker2
Worker 1
Worker 2
<MSFT, 2>
Blk5
77
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 7
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Worker1 does its map task
Worker 1
Worker 2
<MSFT, 2>
Blk5
78
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 8
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Worker 1
Worker 2
<MSFT, 2>
Blk5
Reducer
Shuffle
Phase
Reduce
Phase
<MSFT, 2>
t
process
= 4
79
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 9
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Worker 1
Worker 2
Blk5
Reducer
Shuffle
Phase
Reduce
Phase
<MSFT, 2>
<MSFT, 2>
t
process
= 4
Reducer-MSFT
80
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 9
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Worker 1
Worker 2
Blk5
Reducer
Shuffle
Phase
Reduce
Phase
<MSFT, 2>
<MSFT, 2>
t
process
= 4
Reducer-MSFT
Random Time instance: Do estimation
81
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 9
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Worker 1
Worker 2
Blk5
Reducer
Shuffle
Phase
Reduce
Phase
<MSFT, 2>
<MSFT, 2>
t
process
= 4
Reducer-MSFT
Random Time instance: Do estimation
t
process
> 3
82
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 9
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Worker 1
Worker 2
Blk5
Reducer
Shuffle
Phase
Reduce
Phase
<MSFT, 2>
<MSFT, 2>
t
process
= 4
Reducer-MSFT
Random Time instance: Do estimation
t
process
> 3
83
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 9
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Worker 1
Worker 2
Blk5
Reducer
Shuffle
Phase
Reduce
Phase
<MSFT, 2>
<MSFT, 2>
t
process
= 4
Reducer-MSFT
Random Time instance: Do estimation
t
process
> 3
Estimation
codeBlk6: t
process
= 4
Blk5: t > 3
Blk6: <MSFT, 2>
84
Modifications to MapReduce (Hyracks)
Client Master
Blk1 MSFT
AAPL
2
4
Blk2 ORCL 3
Blk3 AAPL 4
Blk4 MSFT 2
Blk5 ORCL 3
Blk6 MSFT 2
Blk7 AAPL 4
Time t = 9
Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2
Worker 1
Worker 2
Blk5
Reducer
Shuffle
Phase
Reduce
Phase
<MSFT, 2>
<MSFT, 2>
t
process
= 4
Reducer-MSFT
Random Time instance: Do estimation
t
process
> 3
Estimation
code
[5.8, 8]
85
Implementation Overview
 Framework for distributed systems: MapReduce
 Hadoop
- Staged processing → Online
 Hyracks (developed at UC Irvine)
- Pipelining → ”Online”
- Architecture (and API) similar to Hadoop
- http://code.google.com/p/hyracks/
 For estimates of ”Aggregation”,
 2 modifications to MapReduce (Hyracks)
 Bayesian Estimator
86
Bayesian Estimator
 Why ? → To deal with Inspection Paradox
87
Bayesian Estimator
 Why ? → To deal with Inspection Paradox
 How ?
 Allows for correlation between processing time and values
 And also take into account the processing time of current
block
88
Bayesian Estimator
 Why ? → To deal with Inspection Paradox
 How ?
 Allows for correlation between processing time and values
 And also take into account the processing time of current
block
 Implementation:
 C++ code using GNU Scientific Library and Minuit2
 Input: Data file and Metadata file from Reducer
 Output: Confidence Interval → Eg:[995, 1005] with 95% prob
89
Bayesian Estimator (Model)
 Parameterized model:
 Timing Information:Tprocess
, Tscheduling
 Value: X
90
Bayesian Estimator (Model)
 Parameterized model:
 Timing Information:Tprocess
, Tscheduling
 Value: X
 Underlying distribution
 Classical sampling theory: f(X)
91
Bayesian Estimator (Model)
 Parameterized model:
 Timing Information:Tprocess
, Tscheduling
 Value: X
 Underlying distribution
 Classical sampling theory: f(X)
 Our approach: f(X, Tprocess
, Tscheduling
)
92
Bayesian Estimator (Model)
 Parameterized model:
 Timing Information:Tprocess
, Tscheduling
 Value: X
 Underlying distribution
 Classical sampling theory: f(X)
 Our approach: f(X, Tprocess
, Tscheduling
)
- Correlation between X, Tprocess
and Tscheduling
93
Bayesian Estimator (Model)
 Parameterized model:
 Timing Information:Tprocess
, Tscheduling
 Value: X
 Underlying distribution
 Classical sampling theory: f(X)
 Our approach: f(X, Tprocess
, Tscheduling
)
- Correlation between X, Tprocess
and Tscheduling
- f(X | Tprocess
> 100000000, Tscheduling
= 22) ≠ f(X)
94
Bayesian Estimator (Model)
 Parameterized model:
 Timing Information:Tprocess
, Tscheduling
 Value: X
 Underlying distribution
 Classical sampling theory: f(X)
 Our approach: f(X, Tprocess
, Tscheduling
)
- Correlation between X, Tprocess
and Tscheduling
- f(X | Tprocess
> 100000000, Tscheduling
= 22) ≠ f(X)
 Estimation using Bayesian Machinery
 Gibbs Sampler
- Developed probability (or update) equations
95
Bayesian Estimator (Model)
 Parameterized model:
 Timing Information:Tprocess
, Tscheduling
 Value: X
 Underlying distribution
 Classical sampling theory: f(X)
 Our approach: f(X, Tprocess
, Tscheduling
)
- Correlation between X, Tprocess
and Tscheduling
- f(X | Tprocess
> 100000000, Tscheduling
= 22) ≠ f(X)
 Estimation using Bayesian Machinery
 Gibbs Sampler
- Developed probability (or update) equations
Detailed discussion in the paper
96
Outline
 Motivation
 Implementation
 Experiments
 Conclusion
97
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset)
 select sum(page_count) from wikipedia_log group by language
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
98
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset)
 select sum(page_count) from wikipedia_log group by language
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
99
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset)
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
 Experiment 2: (Simulated data set)
 ↑ correlation (Non-uniform configuration)
Percentage of data processed
Reading the figures
100
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset)
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
 Experiment 2: (Simulated data set)
 ↑ correlation (Non-uniform configuration)
Reading the figures
101
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset)
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
 Experiment 2: (Simulated data set)
 ↑ correlation (Non-uniform configuration)
True answer
Reading the figures
102
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset)
 10% of data processed → Non-randomized: Inaccurate estimate
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
 Experiment 2: (Simulated data set)
 ↑ correlation (Non-uniform configuration)
103
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset)
 20% of data processed → Non-randomized: Inaccurate estimate
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
 Experiment 2: (Simulated data set)
 ↑ correlation (Non-uniform configuration)
104
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset)
 Non-randomized → Inaccurate estimates
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
 Experiment 2: (Simulated data set)
 ↑ correlation (Non-uniform configuration)
105
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset)
 Processing large block → no correlation detected
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
 Experiment 2: (Simulated data set)
 ↑ correlation (Non-uniform configuration)
106
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset)
 Correlation detected → With correlation: Slightly more accurate
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
 Experiment 2: (Simulated data set)
 ↑ correlation (Non-uniform configuration)
107
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset)
 Correlation detected → With correlation: Unbiased
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
 Experiment 2: (Simulated data set)
 ↑ correlation (Non-uniform configuration)
108
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset) → Uniform Configuration (low
correlation)
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
 Experiment 2: (Simulated data set)
 ↑ correlation (Non-uniform configuration)
109
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset) → Uniform Configuration (low
correlation) + As ↑ data, likelihood takes over
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
 Experiment 2: (Simulated data set)
 ↑ correlation (Non-uniform configuration)
110
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset) → Uniform Configuration (low
correlation) + As ↑ data, likelihood takes over → estimates similar
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
 Experiment 2: (Simulated data set)
 ↑ correlation (Non-uniform configuration)
111
Experiments
 Hypothesis:
 Randomized Queue required
 Allow correlation between processing time and value
 Convergence of estimates
 Experiment 1: (Real dataset)
 6 months Wikipedia log (220 GB compressed, 3960 blocks)
 11 node cluster (4 disks, 4 cores, 12GB RAM)
 Uniform configuration: Machines, Blocks
 80 mappers and 10 reducer
 Experiment 2: (Simulated data set)
 ↑ correlation (Non-uniform configuration)
112
Outline
 Motivation
 Implementation
 Experiments
 Conclusion
113
Conclusion
 OLA over MapReduce
 Statistically robust estimates
 Model that accounts for biases that can arise in distributed
environment
 Little modification to existing MapReduce architecture
114
Thanks for your time and attention
Questions ?

More Related Content

Similar to Online Aggregation for Large MapReduce Jobs

Certified Reasoning for Automated Verification
Certified Reasoning for Automated VerificationCertified Reasoning for Automated Verification
Certified Reasoning for Automated VerificationAsankhaya Sharma
 
PPT - AutoML-Zero: Evolving Machine Learning Algorithms From Scratch
PPT - AutoML-Zero: Evolving Machine Learning Algorithms From ScratchPPT - AutoML-Zero: Evolving Machine Learning Algorithms From Scratch
PPT - AutoML-Zero: Evolving Machine Learning Algorithms From ScratchJisang Yoon
 
Accurately and Reliably Extracting Data from the Web:
Accurately and Reliably Extracting Data from the Web: Accurately and Reliably Extracting Data from the Web:
Accurately and Reliably Extracting Data from the Web: butest
 
TMPA-2017: Generating Cost Aware Covering Arrays For Free
TMPA-2017: Generating Cost Aware Covering Arrays For Free TMPA-2017: Generating Cost Aware Covering Arrays For Free
TMPA-2017: Generating Cost Aware Covering Arrays For Free Iosif Itkin
 
SQCFramework: SPARQL Query containment Benchmark Generation Framework
SQCFramework: SPARQL Query containment  Benchmark Generation Framework SQCFramework: SPARQL Query containment  Benchmark Generation Framework
SQCFramework: SPARQL Query containment Benchmark Generation Framework Muhammad Saleem
 
Development of Multi-Level ROM
Development of Multi-Level ROMDevelopment of Multi-Level ROM
Development of Multi-Level ROMMohammad
 
Design and analysis of algorithms - Abstract View
Design and analysis of algorithms - Abstract ViewDesign and analysis of algorithms - Abstract View
Design and analysis of algorithms - Abstract ViewWaqas Nawaz
 
Introduction to Polyaxon
Introduction to PolyaxonIntroduction to Polyaxon
Introduction to PolyaxonYu Ishikawa
 
Star Master Cocomo07
Star Master Cocomo07Star Master Cocomo07
Star Master Cocomo07CS, NcState
 
Real Time Analytics - Stream Processing (Colombo big data meetup 18/05/2017)
Real Time Analytics - Stream Processing (Colombo big data meetup 18/05/2017)Real Time Analytics - Stream Processing (Colombo big data meetup 18/05/2017)
Real Time Analytics - Stream Processing (Colombo big data meetup 18/05/2017)mahesh madushanka
 
Kaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learnt
Kaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learntKaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learnt
Kaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learntEugene Yan Ziyou
 
Advanced_Research_Techniques.pdf
Advanced_Research_Techniques.pdfAdvanced_Research_Techniques.pdf
Advanced_Research_Techniques.pdfssuser785ce21
 
Lecture 6.2 flow control repetition
Lecture 6.2  flow control repetitionLecture 6.2  flow control repetition
Lecture 6.2 flow control repetitionalvin567
 
GA.-.Presentation
GA.-.PresentationGA.-.Presentation
GA.-.Presentationoldmanpat
 
Object Oriented Programming in Matlab
Object Oriented Programming in Matlab Object Oriented Programming in Matlab
Object Oriented Programming in Matlab AlbanLevy
 
PR-232: AutoML-Zero:Evolving Machine Learning Algorithms From Scratch
PR-232:  AutoML-Zero:Evolving Machine Learning Algorithms From ScratchPR-232:  AutoML-Zero:Evolving Machine Learning Algorithms From Scratch
PR-232: AutoML-Zero:Evolving Machine Learning Algorithms From ScratchSunghoon Joo
 

Similar to Online Aggregation for Large MapReduce Jobs (20)

Certified Reasoning for Automated Verification
Certified Reasoning for Automated VerificationCertified Reasoning for Automated Verification
Certified Reasoning for Automated Verification
 
PPT - AutoML-Zero: Evolving Machine Learning Algorithms From Scratch
PPT - AutoML-Zero: Evolving Machine Learning Algorithms From ScratchPPT - AutoML-Zero: Evolving Machine Learning Algorithms From Scratch
PPT - AutoML-Zero: Evolving Machine Learning Algorithms From Scratch
 
SQCFramework: SPARQL Query Containment Benchmarks Generation Framework
SQCFramework: SPARQL Query Containment Benchmarks Generation FrameworkSQCFramework: SPARQL Query Containment Benchmarks Generation Framework
SQCFramework: SPARQL Query Containment Benchmarks Generation Framework
 
Accurately and Reliably Extracting Data from the Web:
Accurately and Reliably Extracting Data from the Web: Accurately and Reliably Extracting Data from the Web:
Accurately and Reliably Extracting Data from the Web:
 
ANSSummer2015
ANSSummer2015ANSSummer2015
ANSSummer2015
 
TMPA-2017: Generating Cost Aware Covering Arrays For Free
TMPA-2017: Generating Cost Aware Covering Arrays For Free TMPA-2017: Generating Cost Aware Covering Arrays For Free
TMPA-2017: Generating Cost Aware Covering Arrays For Free
 
SQCFramework: SPARQL Query containment Benchmark Generation Framework
SQCFramework: SPARQL Query containment  Benchmark Generation Framework SQCFramework: SPARQL Query containment  Benchmark Generation Framework
SQCFramework: SPARQL Query containment Benchmark Generation Framework
 
Development of Multi-Level ROM
Development of Multi-Level ROMDevelopment of Multi-Level ROM
Development of Multi-Level ROM
 
Design and analysis of algorithms - Abstract View
Design and analysis of algorithms - Abstract ViewDesign and analysis of algorithms - Abstract View
Design and analysis of algorithms - Abstract View
 
Introduction to Polyaxon
Introduction to PolyaxonIntroduction to Polyaxon
Introduction to Polyaxon
 
Star Master Cocomo07
Star Master Cocomo07Star Master Cocomo07
Star Master Cocomo07
 
Real Time Analytics - Stream Processing (Colombo big data meetup 18/05/2017)
Real Time Analytics - Stream Processing (Colombo big data meetup 18/05/2017)Real Time Analytics - Stream Processing (Colombo big data meetup 18/05/2017)
Real Time Analytics - Stream Processing (Colombo big data meetup 18/05/2017)
 
Kaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learnt
Kaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learntKaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learnt
Kaggle Otto Challenge: How we achieved 85th out of 3,514 and what we learnt
 
Advanced_Research_Techniques.pdf
Advanced_Research_Techniques.pdfAdvanced_Research_Techniques.pdf
Advanced_Research_Techniques.pdf
 
Lecture 6.2 flow control repetition
Lecture 6.2  flow control repetitionLecture 6.2  flow control repetition
Lecture 6.2 flow control repetition
 
C3 w1
C3 w1C3 w1
C3 w1
 
GA.-.Presentation
GA.-.PresentationGA.-.Presentation
GA.-.Presentation
 
Ot performance webinar
Ot performance webinarOt performance webinar
Ot performance webinar
 
Object Oriented Programming in Matlab
Object Oriented Programming in Matlab Object Oriented Programming in Matlab
Object Oriented Programming in Matlab
 
PR-232: AutoML-Zero:Evolving Machine Learning Algorithms From Scratch
PR-232:  AutoML-Zero:Evolving Machine Learning Algorithms From ScratchPR-232:  AutoML-Zero:Evolving Machine Learning Algorithms From Scratch
PR-232: AutoML-Zero:Evolving Machine Learning Algorithms From Scratch
 

Recently uploaded

Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxRosabel UA
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxJanEmmanBrigoli
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 

Recently uploaded (20)

Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 

Online Aggregation for Large MapReduce Jobs

  • 1. Online Aggregation for Large MapReduce Jobs Niketan Pansare1 , Vinayak Borkar2 , Chris Jermaine1 , Tyson Condie3 1 Rice University, 2 UC Irvine, 3 Yahoo! Research
  • 4. 4 OLA example select avg(stock_price) from nasdaq_db where company = 'xyz'; (Note: final answer for this query is 1000)
  • 5. 5 OLA example select avg(stock_price) from nasdaq_db where company = 'xyz'; After 1 second,  Conventional Database:  With OLA extension:  Output range estimate: [0, 2000 ] with 95% probability
  • 6. 6 OLA example select avg(stock_price) from nasdaq_db where company = 'xyz'; After 2 minutes,  Conventional Database:  With OLA extension:  Output range estimate: [900, 1100 ] with 95% probability
  • 7. 7 OLA example select avg(stock_price) from nasdaq_db where company = 'xyz'; After 4 minutes,  Conventional Database:  With OLA extension:  Output range estimate: [950, 1040 ] with 95% probability
  • 8. 8 OLA example select avg(stock_price) from nasdaq_db where company = 'xyz'; After 6 minutes,  Conventional Database:  With OLA extension:  Output range estimate: [990, 1010 ] with 95% probability
  • 9. 9 OLA example select avg(stock_price) from nasdaq_db where company = 'xyz'; After 10 minutes,  Conventional Database:  With OLA extension:  Output range estimate: [995, 1005 ] with 95% probability
  • 10. 10 OLA example select avg(stock_price) from nasdaq_db where company = 'xyz'; After 30 minutes,  Conventional Database:  With OLA extension:  Output range estimate: [999, 1001.5 ] with 95% probability
  • 11. 11 OLA example select avg(stock_price) from nasdaq_db where company = 'xyz'; After 2 hours,  Conventional Database:  Output final answer: 1000  With OLA extension:  Output final answer: 1000
  • 12. 12 Benefit of OLA  If acceptably accurate answer reached quickly, the query can be aborted After 6 minutes,  Conventional Database:  With OLA extension:  Output range estimate: [990, 1015 ] with 95% probability STOP EARLY !!!
  • 13. 13 Why Stop Early ?  Save human time (1 hour 54 minutes)  'Answer 1000' v/s 'Estimate 1002.5' - For exploratory apps - Inaccuracies in ETL process
  • 14. 14 Why Stop Early ?  Save human time (1 hour 54 minutes)  'Answer 1000' v/s 'Estimate 1002.5' - For exploratory apps - Inaccuracies in ETL process  Save machine time → Cost ↓
  • 15. 15 Why Stop Early ?  Save human time (1 hour 54 minutes)  'Answer 1000' v/s 'Estimate 1002.5' - For exploratory apps - Inaccuracies in ETL process  Save machine time → Cost ↓  Very important when dealing with large data
  • 16. 16 Why Stop Early ?  Save human time (1 hour 54 minutes)  'Answer 1000' v/s 'Estimate 1002.5' - For exploratory apps - Inaccuracies in ETL process  Save machine time → Cost ↓  Very important when dealing with large data Online Aggregation - Introduced in 1997 - Significant research impact (606 citations) - ACM SIGMOD Test of Time Award But, limited commercial impact - Database market (self-managed)
  • 17. 17 Self-managed DB → Cloud  Cost model  In Self-managed DB: costs are fixed  In Cloud: You pay for amount of hardware used - Less resources → Less cost - 10 node cluster: 1h 54min → save $12.92/query on EC2  User needs to justify the cost to the organization
  • 18. 18 Self-managed DB → Cloud  Cost model  In Self-managed DB: costs are fixed  In Cloud: You pay for amount of hardware used - Less resources → Less cost - 10 node cluster: 1h 54min → save $12.92/query on EC2  User needs to justify the cost to the organization  Modifiying engine to support randomization  Traditional DB: Notoriously difficult  Cloud: Much simpler
  • 19. 19 Self-managed DB → Cloud  Cost model  In Self-managed DB: costs are fixed  In Cloud: You pay for amount of hardware used - Less resources → Less cost - 10 node cluster: 1h 54min → save $12.92/query on EC2  User needs to justify the cost to the organization  Modifiying engine to support randomization  Traditional DB: Notoriously difficult  Cloud: Much simpler  Therefore, OLA for cloud is an interesting problem
  • 20. 20 Extend existing approaches  OLA over single machine  OLA over multiple machine  Why it won't work ?  How do we deal with those issues ?
  • 21. 21 Extend existing approaches  OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  OLA over multiple machines  Why it won't work ?  How do we deal with those issues ?
  • 22. 22 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Note: True answer = 55 5, 9 7, 4, 2 8, 3 1, 10, 6
  • 23. 23 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values 5, 9 7, 4, 2 8, 3 1, 10, 6
  • 24. 24 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {} Estimate = Not available 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2
  • 25. 25 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {} Estimate = Not available 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2
  • 26. 26 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {} Estimate = Not available 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2
  • 27. 27 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {13} Estimate = 13 * 4 / 1 = 52 7, 4, 2 5, 9 7, 4, 2 8, 3 1, 10, 6
  • 28. 28 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {13} Estimate = 13 * 4 / 1 = 52 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2 8, 3
  • 29. 29 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {13} Estimate = 13 * 4 / 1 = 52 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2 8, 3
  • 30. 30 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {13, 11} Estimate = (13 + 11) * 4 / 2 = 48 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2 8, 3
  • 31. 31 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {13, 11} Estimate = (13 + 11) * 4 / 2 = 48 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2 8, 3
  • 32. 32 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {13, 11} Estimate = (13 + 11) * 4 / 2 = 48 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2 8, 3 5, 9
  • 33. 33 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {13, 11} Estimate = (13 + 11) * 4 / 2 = 48 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2 8, 3 5, 9
  • 34. 34 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {13, 11, 14} Estimate = (13 + 11 + 14) * 4 / 3 = 50.67 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2 8, 3 5, 9
  • 35. 35 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {13, 11, 14} Estimate = (13 + 11 + 14) * 4 / 3 = 50.67 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 36. 36 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {13, 11, 14} Estimate = (13 + 11 + 14) * 4 / 3 = 50.67 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 37. 37 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {13, 11, 14} Estimate = (13 + 11 + 14) * 4 / 3 = 50.67 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 38. 38 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {13, 11, 14} Estimate = (13 + 11 + 14) * 4 / 3 = 50.67 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 39. 39 OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  Example: Find SUM of below values Sample = {13, 11, 14, 17} Estimate = (13 + 11 + 14 + 17) * 4 / 4 = 55 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 40. 40 Extend existing approaches  OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks  Blocks arrive in random order  OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Why it won't work ?  How do we deal with those issues ?
  • 41. 41 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable So, instead of  Example: Find SUM of below values 5, 9 7, 4, 2 8, 3 1, 10, 6 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 42. 42 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values 1, 10, 6 7, 4, 2 8, 3 5, 9 1, 10, 6 5, 9 8, 3 7, 4, 2 X axis = Processing Time
  • 43. 43 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values  Blocks that take  long time to process = RED  Short time to process = Green 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 44. 44 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values Arrows = Random Time Instances (Polling blocks) 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 45. 45 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 46. 46 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 47. 47 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 48. 48 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 49. 49 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 50. 50 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 51. 51 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 52. 52 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 53. 53 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 54. 54 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values Notice, there are more arrows on red region than green region 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 55. 55 OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Example: Find SUM of below values Notice, there are more arrows on red region than green region Inspection Paradox: At any random time t, (stochastically) you will be processing those blocks that take long time 7, 4, 2 8, 3 5, 9 1, 10, 6
  • 56. 56 Extend existing approaches  OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks - Arrive in random order  OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Why it won't work ?  How do we deal with those issues ?
  • 57. 57 Why won't previous approach work ?  Inspection paradox → At the time of estimation, processing longer blocks  Possible: correlation between processing time and value  Eg: count query
  • 58. 58 Why won't previous approach work ?  Inspection paradox → At the time of estimation, processing longer blocks  Possible: correlation between processing time and value  Eg: count query  Biased estimates → current techniques won't work
  • 59. 59 Why won't previous approach work ?  Inspection paradox → At the time of estimation, processing longer blocks  Possible: correlation between processing time and value  Eg: count query  Biased estimates → current techniques won't work This effect is found experimentally in the paper: 'MapReduce Online'
  • 60. 60 Why won't previous approach work ?  Inspection paradox → At the time of estimation, processing longer blocks  Possible: correlation between processing time and value  Eg: count query  Biased estimates → current techniques won't work  Therefore, need to deal with inspection paradox in principled fashion
  • 61. 61 Extend existing approaches  OLA over single machine  Confidence interval found using classical sampling theory  Tuples are bundled into blocks - Arrive in random order  OLA over multiple machines  Blocks → Non-uniform → Size, Locality, Machine, Network  Processing time for block can be large and highly variable  Why it won't work ?  How do we deal with those issues ?
  • 62. 62 How do we deal with Inspection Paradox  Capture timing information (i.e. processing time of block)  Along with values  Instead of using classical sampling theory, we output estimates using bayesian model that:  Allows for correlation between processing time and values  And also takes into account the processing time of current block
  • 64. 64 Implementation Overview  Framework for distributed systems: MapReduce  Hadoop - Staged processing → Online  Hyracks (developed at UC Irvine) - Pipelining → ”Online” - Architecture (and API) similar to Hadoop - http://code.google.com/p/hyracks/  For estimates of ”Aggregation”,  2 modifications to MapReduce (Hyracks)  Bayesian Estimator
  • 65. 65 Implementation Overview  Framework for distributed systems: MapReduce  Hadoop - Staged processing → Online  Hyracks (developed at UC Irvine) - Pipelining → ”Online” - Architecture (and API) similar to Hadoop - http://code.google.com/p/hyracks/  For estimates of ”Aggregation”,  2 modifications to MapReduce (Hyracks)  Bayesian Estimator
  • 66. 66 Implementation Overview  Framework for distributed systems: MapReduce  Hadoop - Staged processing → Online  Hyracks (developed at UC Irvine) - Pipelining → ”Online” - Architecture (and API) similar to Hadoop - http://code.google.com/p/hyracks/  For estimates of ”Aggregation”,  2 modifications to MapReduce (Hyracks)  Bayesian Estimator
  • 67. 67 Modifications to MapReduce (Hyracks)  Master  Maintains random ordering of blocks - Logical not physical queue  Assigns block from head of queue  Block comes to head of queue → Timer starts (processing time)  Two intermediates set of files  Data file → Values  Metadata file → Timing information  Shuffle phase of reducer
  • 68. 68 Modifications to MapReduce (Hyracks) Client Master select sum(stock_price) from nasdaq_db group by company; Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4
  • 69. 69 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 0
  • 70. 70 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 1 Blk 1 Blk 2 Blk 3 Blk 4 Blk 5 Blk 6 Blk 7 Master maintains a logical queue of the blocks
  • 71. 71 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 1 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Master randomizes the queue
  • 72. 72 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 2 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Master forks workers Worker 1 Worker 2
  • 73. 73 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 3 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Workers request for blocks Worker 1 Worker 2
  • 74. 74 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 4 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Masters reads head of queue and assigns it to first worker Worker 1 Worker 2 Blk6
  • 75. 75 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 5 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Worker1 starts reading Blk6Worker 1 Worker 2 Blk6
  • 76. 76 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 6 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Assigns Blk5 to Worker2 Worker 1 Worker 2 <MSFT, 2> Blk5
  • 77. 77 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 7 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Worker1 does its map task Worker 1 Worker 2 <MSFT, 2> Blk5
  • 78. 78 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 8 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Worker 1 Worker 2 <MSFT, 2> Blk5 Reducer Shuffle Phase Reduce Phase <MSFT, 2> t process = 4
  • 79. 79 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 9 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Worker 1 Worker 2 Blk5 Reducer Shuffle Phase Reduce Phase <MSFT, 2> <MSFT, 2> t process = 4 Reducer-MSFT
  • 80. 80 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 9 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Worker 1 Worker 2 Blk5 Reducer Shuffle Phase Reduce Phase <MSFT, 2> <MSFT, 2> t process = 4 Reducer-MSFT Random Time instance: Do estimation
  • 81. 81 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 9 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Worker 1 Worker 2 Blk5 Reducer Shuffle Phase Reduce Phase <MSFT, 2> <MSFT, 2> t process = 4 Reducer-MSFT Random Time instance: Do estimation t process > 3
  • 82. 82 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 9 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Worker 1 Worker 2 Blk5 Reducer Shuffle Phase Reduce Phase <MSFT, 2> <MSFT, 2> t process = 4 Reducer-MSFT Random Time instance: Do estimation t process > 3
  • 83. 83 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 9 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Worker 1 Worker 2 Blk5 Reducer Shuffle Phase Reduce Phase <MSFT, 2> <MSFT, 2> t process = 4 Reducer-MSFT Random Time instance: Do estimation t process > 3 Estimation codeBlk6: t process = 4 Blk5: t > 3 Blk6: <MSFT, 2>
  • 84. 84 Modifications to MapReduce (Hyracks) Client Master Blk1 MSFT AAPL 2 4 Blk2 ORCL 3 Blk3 AAPL 4 Blk4 MSFT 2 Blk5 ORCL 3 Blk6 MSFT 2 Blk7 AAPL 4 Time t = 9 Blk 6 Blk 5 Blk 3 Blk 1 Blk 4 Blk 7 Blk 2 Worker 1 Worker 2 Blk5 Reducer Shuffle Phase Reduce Phase <MSFT, 2> <MSFT, 2> t process = 4 Reducer-MSFT Random Time instance: Do estimation t process > 3 Estimation code [5.8, 8]
  • 85. 85 Implementation Overview  Framework for distributed systems: MapReduce  Hadoop - Staged processing → Online  Hyracks (developed at UC Irvine) - Pipelining → ”Online” - Architecture (and API) similar to Hadoop - http://code.google.com/p/hyracks/  For estimates of ”Aggregation”,  2 modifications to MapReduce (Hyracks)  Bayesian Estimator
  • 86. 86 Bayesian Estimator  Why ? → To deal with Inspection Paradox
  • 87. 87 Bayesian Estimator  Why ? → To deal with Inspection Paradox  How ?  Allows for correlation between processing time and values  And also take into account the processing time of current block
  • 88. 88 Bayesian Estimator  Why ? → To deal with Inspection Paradox  How ?  Allows for correlation between processing time and values  And also take into account the processing time of current block  Implementation:  C++ code using GNU Scientific Library and Minuit2  Input: Data file and Metadata file from Reducer  Output: Confidence Interval → Eg:[995, 1005] with 95% prob
  • 89. 89 Bayesian Estimator (Model)  Parameterized model:  Timing Information:Tprocess , Tscheduling  Value: X
  • 90. 90 Bayesian Estimator (Model)  Parameterized model:  Timing Information:Tprocess , Tscheduling  Value: X  Underlying distribution  Classical sampling theory: f(X)
  • 91. 91 Bayesian Estimator (Model)  Parameterized model:  Timing Information:Tprocess , Tscheduling  Value: X  Underlying distribution  Classical sampling theory: f(X)  Our approach: f(X, Tprocess , Tscheduling )
  • 92. 92 Bayesian Estimator (Model)  Parameterized model:  Timing Information:Tprocess , Tscheduling  Value: X  Underlying distribution  Classical sampling theory: f(X)  Our approach: f(X, Tprocess , Tscheduling ) - Correlation between X, Tprocess and Tscheduling
  • 93. 93 Bayesian Estimator (Model)  Parameterized model:  Timing Information:Tprocess , Tscheduling  Value: X  Underlying distribution  Classical sampling theory: f(X)  Our approach: f(X, Tprocess , Tscheduling ) - Correlation between X, Tprocess and Tscheduling - f(X | Tprocess > 100000000, Tscheduling = 22) ≠ f(X)
  • 94. 94 Bayesian Estimator (Model)  Parameterized model:  Timing Information:Tprocess , Tscheduling  Value: X  Underlying distribution  Classical sampling theory: f(X)  Our approach: f(X, Tprocess , Tscheduling ) - Correlation between X, Tprocess and Tscheduling - f(X | Tprocess > 100000000, Tscheduling = 22) ≠ f(X)  Estimation using Bayesian Machinery  Gibbs Sampler - Developed probability (or update) equations
  • 95. 95 Bayesian Estimator (Model)  Parameterized model:  Timing Information:Tprocess , Tscheduling  Value: X  Underlying distribution  Classical sampling theory: f(X)  Our approach: f(X, Tprocess , Tscheduling ) - Correlation between X, Tprocess and Tscheduling - f(X | Tprocess > 100000000, Tscheduling = 22) ≠ f(X)  Estimation using Bayesian Machinery  Gibbs Sampler - Developed probability (or update) equations Detailed discussion in the paper
  • 97. 97 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset)  select sum(page_count) from wikipedia_log group by language  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer
  • 98. 98 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset)  select sum(page_count) from wikipedia_log group by language  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer
  • 99. 99 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset)  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer  Experiment 2: (Simulated data set)  ↑ correlation (Non-uniform configuration) Percentage of data processed Reading the figures
  • 100. 100 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset)  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer  Experiment 2: (Simulated data set)  ↑ correlation (Non-uniform configuration) Reading the figures
  • 101. 101 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset)  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer  Experiment 2: (Simulated data set)  ↑ correlation (Non-uniform configuration) True answer Reading the figures
  • 102. 102 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset)  10% of data processed → Non-randomized: Inaccurate estimate  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer  Experiment 2: (Simulated data set)  ↑ correlation (Non-uniform configuration)
  • 103. 103 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset)  20% of data processed → Non-randomized: Inaccurate estimate  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer  Experiment 2: (Simulated data set)  ↑ correlation (Non-uniform configuration)
  • 104. 104 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset)  Non-randomized → Inaccurate estimates  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer  Experiment 2: (Simulated data set)  ↑ correlation (Non-uniform configuration)
  • 105. 105 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset)  Processing large block → no correlation detected  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer  Experiment 2: (Simulated data set)  ↑ correlation (Non-uniform configuration)
  • 106. 106 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset)  Correlation detected → With correlation: Slightly more accurate  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer  Experiment 2: (Simulated data set)  ↑ correlation (Non-uniform configuration)
  • 107. 107 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset)  Correlation detected → With correlation: Unbiased  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer  Experiment 2: (Simulated data set)  ↑ correlation (Non-uniform configuration)
  • 108. 108 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset) → Uniform Configuration (low correlation)  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer  Experiment 2: (Simulated data set)  ↑ correlation (Non-uniform configuration)
  • 109. 109 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset) → Uniform Configuration (low correlation) + As ↑ data, likelihood takes over  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer  Experiment 2: (Simulated data set)  ↑ correlation (Non-uniform configuration)
  • 110. 110 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset) → Uniform Configuration (low correlation) + As ↑ data, likelihood takes over → estimates similar  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer  Experiment 2: (Simulated data set)  ↑ correlation (Non-uniform configuration)
  • 111. 111 Experiments  Hypothesis:  Randomized Queue required  Allow correlation between processing time and value  Convergence of estimates  Experiment 1: (Real dataset)  6 months Wikipedia log (220 GB compressed, 3960 blocks)  11 node cluster (4 disks, 4 cores, 12GB RAM)  Uniform configuration: Machines, Blocks  80 mappers and 10 reducer  Experiment 2: (Simulated data set)  ↑ correlation (Non-uniform configuration)
  • 113. 113 Conclusion  OLA over MapReduce  Statistically robust estimates  Model that accounts for biases that can arise in distributed environment  Little modification to existing MapReduce architecture
  • 114. 114 Thanks for your time and attention Questions ?