In-‑situ ¡MapReduce ¡for ¡Log ¡ Processing ¡
Dionysios ¡Logothe9s, ¡Kevin ¡Webb, ¡Kenneth ¡Yocum ¡
UC ¡San ¡Diego ¡
Chris ¡Trezzo ¡
Salesforce ¡Inc. ¡
USENIX ¡Annual ¡Technical ¡Conference ¡ June ¡2011 ¡
In-situ MapReduce for Log Processing Dionysios Logothe9s, - - PowerPoint PPT Presentation
In-situ MapReduce for Log Processing Dionysios Logothe9s, Kevin Webb, Kenneth Yocum UC San Diego Chris Trezzo Salesforce Inc. USENIX Annual Technical
Dionysios ¡Logothe9s, ¡Kevin ¡Webb, ¡Kenneth ¡Yocum ¡
UC ¡San ¡Diego ¡
Chris ¡Trezzo ¡
Salesforce ¡Inc. ¡
USENIX ¡Annual ¡Technical ¡Conference ¡ June ¡2011 ¡
2 ¡
TBs ¡of ¡logs ¡ Examples: ¡
– Migrate ¡logs ¡to ¡dedicated ¡clusters ¡
Problems: ¡
– e.g. ¡Facebook ¡collects ¡100TB ¡a ¡day! ¡ – Data ¡migra9on ¡stresses ¡network ¡and ¡disks ¡
– e.g. ¡server ¡is ¡unreachable ¡ – Delay ¡analysis ¡or ¡process ¡incomplete ¡data ¡
– e.g. ¡ ¡long ¡data ¡migra9on ¡9mes ¡ – Hinders ¡real-‑9me ¡apps: ¡ad-‑targe9ng, ¡fraud ¡detec9on ¡ Store ¡first… ¡ … ¡query ¡later ¡
3 ¡
MapReduce ¡
Dedicated ¡cluster ¡ Servers ¡
Idea: ¡
Op9mized ¡for: ¡
– e.g. ¡up ¡to ¡80% ¡data ¡filtered ¡or ¡summarized! ¡
– e.g. ¡ ¡Ad ¡re-‑targe9ng ¡based ¡on ¡most ¡recent ¡clicks ¡
4 ¡
Dedicated ¡cluster ¡ Servers ¡
The ¡same: ¡
– map(r) ¡ ¡{k,v} ¡: ¡ ¡extract/filter ¡data ¡ – reduce( ¡{k, ¡v[]} ¡) ¡ ¡ ¡v’ ¡: ¡data ¡aggrega9on ¡ – combine( ¡{k, ¡v[]} ¡) ¡ ¡v’ ¡: ¡early, ¡par9al ¡aggrega9on ¡
The ¡new: ¡
– Range ¡of ¡data ¡ ¡ – Update ¡frequency ¡ – e.g. ¡Process ¡user ¡clicks ¡over ¡the ¡last ¡60’’… ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡… ¡and ¡update ¡analysis ¡every ¡15’’ ¡
6 ¡
Map ¡ Combine ¡
0’’ ¡ 60’’ ¡ 30’’ ¡ 90’’ ¡ Log ¡entries ¡ Time ¡
Reduce ¡
– Distribute ¡processing ¡load ¡ – Reduce ¡network ¡traffic ¡
Problem: ¡
– Processed ¡mul9ple ¡9mes: ¡wastes ¡CPU ¡ – Sent ¡to ¡the ¡root ¡mul9ple ¡9mes: ¡wastes ¡network ¡
7 ¡ 7 ¡
Reduce ¡
Query ¡root ¡
Map ¡ Combine ¡
log ¡entries ¡
Map ¡ Combine ¡
log ¡entries ¡ Combine ¡ windows ¡ ¡ in-‑network ¡
Map ¡ Combine ¡
Overlapping ¡data ¡
analysis ¡
8 ¡
Map ¡ Combine ¡
0’’ ¡ 60’’ ¡ 30’’ ¡ 90’’ ¡ Time ¡ P1 ¡ P2 ¡ P3 ¡ P1 ¡ P2 ¡ P3 ¡ P4 ¡ P4 ¡
Reduce ¡
Challenges: ¡
9 ¡ Map ¡
Combine ¡
P1 ¡ P2 ¡ P3 ¡ P4 ¡
Reduce ¡
– Space ¡(server ¡nodes) ¡ – Time ¡(processing ¡window) ¡
– Marks ¡successfully ¡received ¡panes ¡
10 ¡ 10 ¡
N1 ¡ N2 ¡ N3 ¡ N4 ¡ P1 ¡ P2 ¡ P3 ¡ P4 ¡
Time ¡ Space ¡
Users ¡may ¡specify: ¡
– e.g. ¡process ¡window ¡within ¡60sec ¡
– e.g. ¡at ¡least ¡50% ¡of ¡the ¡total ¡data ¡
– Impact ¡latency ¡and ¡accuracy ¡of ¡analysis ¡
11 ¡
N1 ¡ N2 ¡ N3 ¡ N4 ¡ P1 ¡ P2 ¡ P3 ¡ P4 ¡ N1 ¡ N2 ¡ N3 ¡ N4 ¡ P1 ¡ P2 ¡ P3 ¡ P4 ¡
Time ¡ Space ¡ Time ¡ Space ¡
– e.g. ¡50% ¡of ¡the ¡data ¡
– Returns ¡the ¡earliest ¡data ¡available ¡ – e.g. ¡data ¡from ¡the ¡fastest ¡servers ¡
– Accurately ¡summarizes ¡rela9ve ¡event ¡frequencies ¡
12 ¡
N1 ¡ N2 ¡ N3 ¡ N4 ¡ P1 ¡ P2 ¡ P3 ¡ P4 ¡
– e.g. ¡random ¡50% ¡of ¡the ¡data ¡
– Included ¡data ¡may ¡not ¡be ¡the ¡first ¡available ¡
– Reproduces ¡rela9ve ¡occurrence ¡of ¡events ¡
13 ¡
N1 ¡ N2 ¡ N3 ¡ N4 ¡ P1 ¡ P2 ¡ P3 ¡ P4 ¡
Temporal ¡completeness: ¡
– e.g. ¡all ¡data ¡from ¡50% ¡of ¡the ¡nodes ¡
– e.g. ¡coun9ng ¡events ¡on ¡a ¡per ¡node ¡basis ¡
Spa9al ¡completeness: ¡
– e.g ¡ ¡click ¡sessioniza9on ¡
14 ¡
N1 ¡ N2 ¡ N3 ¡ N4 ¡ P1 ¡ P2 ¡ P3 ¡ P4 ¡ N1 ¡ N2 ¡ N3 ¡ N4 ¡ P1 ¡ P2 ¡ P3 ¡ P4 ¡
[Logothe9s ¡et ¡al., ¡USENIX’08] ¡
– Sliding ¡windows ¡ – In-‑network ¡aggrega9on ¡trees ¡
– MapReduce ¡API ¡ – Paned-‑based ¡processing ¡ – Fault ¡tolerance ¡mechanisms: ¡operator ¡restart, ¡adap9ve ¡ data ¡rou9ng ¡
15 ¡
– Nodes ¡monitor ¡local ¡processing ¡rate ¡ – Shed ¡panes ¡that ¡cannot ¡be ¡processed ¡on ¡9me ¡
constraints ¡
16 ¡
– Understanding ¡incomplete ¡results ¡ – Trading ¡fidelity ¡for ¡latency ¡ – Applica9ons: ¡
– Improving ¡fidelity ¡under ¡load ¡with ¡load ¡shedding ¡ – Minimize ¡impact ¡on ¡services ¡
17 ¡
for ¡every ¡HDFS ¡server, ¡to ¡detect ¡outliers ¡
18 ¡
incorrect ¡
– Distribu9ons ¡are ¡100% ¡accurate ¡ – Computed ¡on ¡per ¡server ¡basis ¡
– Poor ¡results ¡if ¡more ¡than ¡20% ¡data ¡lost ¡ – Reduce ¡latency ¡by ¡>25% ¡
19 ¡
0 ¡ 0.2 ¡ 0.4 ¡ 0.6 ¡ 0.8 ¡ 1 ¡ 0 ¡ 20 ¡ 40 ¡ 60 ¡ 80 ¡ 100 ¡ Probability ¡ Data ¡volume ¡(%) ¡ Random ¡ Spa9al ¡completeness ¡ Temporal ¡completeness ¡ 0 ¡ 100 ¡ 200 ¡ 300 ¡ 400 ¡ 0 ¡ 20 ¡ 40 ¡ 60 ¡ 80 ¡ 100 ¡ Latency ¡(sec) ¡ Data ¡volume ¡(%) ¡ Temporal ¡completeness ¡ Random ¡ Spa9al ¡completeness ¡
100% ¡accuracy ¡ 25% ¡decrease ¡
– Result ¡fidelity ¡ – Hadoop ¡performance ¡(job ¡throughput) ¡
useful ¡results ¡
20 ¡
0 ¡ 20 ¡ 40 ¡ 60 ¡ 80 ¡ 100 ¡ 0 ¡ 1 ¡ 2 ¡ 3 ¡ 4 ¡ 5 ¡ 6 ¡ 7 ¡ 8 ¡ 9 ¡ 10 ¡ Fidelity ¡(%) ¡ Niceness ¡ Shedding ¡ No ¡shedding ¡ 0 ¡ 20 ¡ 40 ¡ 60 ¡ 80 ¡ 100 ¡ 0 ¡ 1 ¡ 2 ¡ 3 ¡ 4 ¡ 5 ¡ 6 ¡ 7 ¡ 8 ¡ 9 ¡ 10 ¡ RelaAve ¡performance ¡(%) ¡ Niceness ¡
560% ¡ <11% ¡overhead ¡
data ¡transfers, ¡reduces ¡analysis ¡9me ¡
provides ¡9mely ¡analysis ¡
for ¡latency ¡
and ¡9me ¡constraints ¡
21 ¡