bigdebug debugging primitives for interactive big data
play

BigDebug: Debugging Primitives for Interactive Big Data - PowerPoint PPT Presentation

BigDebug: Debugging Primitives for Interactive Big Data Processing in Spark Muhammad Ali Gulzar, Matteo Interlandi, Seunghyun Yoo, Sai Deep Tetali, Tyson Condie,


  1. BigDebug: ¡Debugging ¡Primitives ¡for ¡ Interactive ¡Big ¡Data ¡Processing ¡in ¡Spark Muhammad ¡ Ali ¡Gulzar, Matteo ¡Interlandi, ¡ Seunghyun ¡Yoo, ¡Sai ¡Deep ¡Tetali, ¡ Tyson ¡Condie, ¡Todd ¡Millstein, ¡Miryung ¡Kim University ¡ of ¡California, ¡ Los ¡Angeles 1

  2. Developing ¡Big ¡Data ¡Analytics • Big ¡Data ¡Analytics ¡is ¡becoming ¡increasingly ¡important. ¡ • Big ¡Data ¡Analytics ¡are ¡built ¡using ¡data ¡intensive ¡computing ¡ platforms ¡such ¡as ¡Map ¡Reduce, ¡Hadoop, ¡and ¡Apache ¡Spark. ¡ Apache Pig Map Reduce 2

  3. Apache ¡Spark: ¡Next ¡Generation ¡Map ¡Reduce • Apache ¡Spark ¡is ¡up ¡to ¡100X ¡faster ¡than ¡Hadoop MapReduce • It ¡is ¡open ¡source ¡and ¡over ¡800 ¡developers ¡have ¡contributed ¡in ¡its ¡ development • 200+ ¡companies ¡are ¡currently ¡using ¡Spark ¡ • Spark ¡also ¡provides ¡libraries ¡such ¡as ¡SparkSQL and ¡Mllib 3

  4. Running ¡a ¡Map ¡Reduce ¡Job ¡on ¡Cluster Filter Map Reduce A ¡user ¡submits ¡a ¡job A ¡job ¡is ¡distributed ¡to ¡ workers ¡in ¡cluster Each ¡worker ¡performs ¡pipelined ¡transformations ¡on ¡a ¡ partition ¡with ¡millions ¡of ¡records 4

  5. Motivating ¡Scenario: ¡Election ¡Record ¡Analysis VoterID Candidate ¡ ¡State ¡ ¡Time • Alice ¡writes ¡a ¡Spark ¡program ¡ 9213 Sanders ¡ ¡ ¡ ¡ ¡ TX 1440023087 that ¡runs ¡correctly ¡on ¡local ¡ 1 val log = "s3n://poll.log" machine ¡(100MB ¡data) ¡but ¡ 2 val text_file = spark.textFile(log) 3 val count = text_file crashes ¡on ¡cluster ¡(1TB) 4 .filter( line => line.split()[3].toInt 5 > 1440012701) 6 .map(line = > (line.split()[1] , 1)) • Alice ¡cannot ¡see ¡the ¡crash-­‑ 7 .reduceByKey(_ + _).collect() inducing ¡intermediate ¡ result. ¡ • Alice ¡cannot ¡identify ¡which ¡input ¡ from ¡1TB ¡causing ¡crash • When ¡crash ¡occurs, ¡all ¡ intermediate ¡ results ¡are ¡thrown ¡ away. 5

  6. Motivating ¡Scenario: ¡Election ¡Record ¡Analysis VoterID Candidate ¡ ¡State ¡ ¡Time • Alice ¡writes ¡a ¡Spark ¡program ¡ 9213 Sanders ¡ ¡ ¡ ¡ ¡ TX 1440023087 that ¡runs ¡correctly ¡on ¡local ¡ 1 val log = "s3n://poll.log" machine ¡(100MB ¡data ¡) ¡but ¡ 2 val text_file = spark.textFile(log) 3 val count = text_file crashes ¡on ¡cluster ¡(1TB) 4 .filter( line => line.split()[3].toInt 5 > 1440012701) 6 .map(line = > (line.split()[1] , 1)) • Alice ¡cannot ¡see ¡the ¡crash-­‑ 7 .reduceByKey(_ + _).collect() inducing ¡intermediate ¡ result. ¡ • Alice ¡cannot ¡identify ¡which ¡input ¡ Task 31 failed 3 times; aborting from ¡1TB ¡causing ¡crash job ERROR Executor: Exception in task 31 in stage 0 (TID 31) • When ¡crash ¡occurs, ¡all ¡ intermediate ¡ results ¡are ¡thrown ¡ java.lang.NumberFormatException away. 6

  7. BigDebug: ¡Interactive ¡Debugger ¡Features 1 Simulated ¡Breakpoint 2 Guarded ¡Watchpoint 3 Crash ¡Culprit ¡Identification 4 Backward ¡and ¡Forward ¡ Tracing $>Crash inducing input records : Crashing at transformation 2 9K23 Cruz TX 1440023645 Crashing Record : “Sanders” 2FSD Cruz KS 1440026456 ArrayIndexOutofBoundException 9909 Cruz KS 1440023768 7

  8. Outline • Interactive ¡Debugging ¡Primitives 1. ¡Simulated ¡Breakpoint 2. ¡On-­‑Demand ¡Watchpoint 3. ¡Crash ¡Culprit Identification 4. ¡Backward ¡and ¡Forward ¡Tracing 5. ¡Fine ¡Grained ¡Latency ¡Alert • Performance ¡Evaluation 8

  9. Why ¡Traditional ¡Debug ¡Primitives ¡Do ¡Not ¡Work ¡ for ¡Apache ¡Spark? Enabling ¡interactive ¡debugging ¡requires ¡us ¡to re-­‑think ¡the ¡features ¡ of ¡traditional ¡debugger ¡ such ¡as ¡GDB • Pausing ¡the ¡entire ¡computation ¡on ¡the ¡cloud ¡could ¡reduce ¡ throughput • It ¡is ¡clearly ¡infeasible ¡for ¡a ¡user ¡to ¡inspect ¡billion ¡of ¡records ¡ through ¡a ¡regular ¡watchpoint • Even ¡launching ¡remote ¡JVM ¡debuggers ¡to ¡individual ¡worker ¡ nodes ¡cannot ¡scale ¡for ¡big ¡data ¡computing 9

  10. Spark ¡Program ¡with ¡Transformations ReduceByKey Map Flatmap Map ReduceByKey Filter 10

  11. Spark ¡Program ¡Scheduled ¡as ¡Stages ReduceByKey Map Flatmap Map ReduceByKey Filter Stage ¡1 Stage ¡2 Stage ¡3 11

  12. Materialization ¡Points ¡in ¡Spark ¡ ReduceByKey Map Flatmap Map ReduceByKey Filter Stage ¡1 Stage ¡2 Stage ¡3 Stored ¡data ¡ records 12

  13. 1. ¡Simulated ¡Breakpoint ReduceByKey Map Flatmap Map ReduceByKey Filter Stage ¡1 Stage ¡2 Stage ¡3 Stored ¡data ¡ records 13

  14. 1. ¡Simulated ¡Breakpoint Breakpoint ReduceByKey Map Flatmap Map ReduceByKey Filter Stage ¡1 Stage ¡2 Stage ¡3 Stored ¡data ¡ records 14

  15. 1. ¡Simulated ¡Breakpoint Breakpoint ReduceByKey Map Flatmap Map ReduceByKey Filter Stage ¡1 Stage ¡2 Stage ¡3 Stored ¡data ¡ records Simulated ¡breakpoint ¡replays ¡computation ¡from ¡the ¡latest ¡ materialization ¡point ¡where ¡data ¡is ¡stored ¡in ¡memory 15

  16. 1. ¡Simulated ¡Breakpoint – Realtime Code ¡Fix ¡ Breakpoint ReduceByKey Map Flatmap Map ReduceByKey Filter Stage ¡1 Stage ¡2 Stage ¡3 Allow ¡a ¡user ¡to ¡fix ¡code ¡after ¡the ¡breakpoint 16

  17. 2. ¡On-­‑Demand ¡Guarded ¡Watchpoint ReduceByKey Map Watchpoint Flatmap Map Stage ¡2 Stage ¡1 Watchpoint captures ¡individual ¡data ¡records ¡matching ¡a ¡user-­‑ provided ¡guard 17

  18. 2. ¡On-­‑Demand ¡Guarded ¡Watchpoint ReduceByKey Map Watchpoint Flatmap Map Stage ¡2 Stage ¡1 state.equals(“TX”)||state.equals(“CA”) ¡ Watchpoint captures ¡individual ¡data ¡records ¡matching ¡a ¡user-­‑ provided ¡guard 18

  19. 2. ¡On-­‑Demand ¡Guarded ¡Watchpoint ReduceByKey Map Watchpoint Flatmap Map Stage ¡2 Stage ¡1 state.equals(“CA”) ¡ Watchpoint captures ¡individual ¡data ¡records ¡matching ¡a ¡user-­‑ provided ¡guard 19

  20. Crash ¡in ¡Apache ¡Spark A ¡job ¡failure ¡in ¡Spark ¡throws ¡away ¡the ¡intermediate ¡ results ¡ of ¡correctly ¡ computed ¡stages Map ReduceByKey Map Flatmap ReduceByKey Filter Stage ¡2 Stage ¡3 Stage ¡1 Task 31 failed 3 times; aborting job ERROR Executor: Exception in task 31 in stage 0 (TID 31) java.lang.NumberFormatException To ¡recover ¡to ¡from ¡crash, ¡a ¡user ¡need ¡to ¡find ¡input ¡causing ¡crash ¡ and ¡re-­‑execute ¡the ¡whole ¡job. 20

  21. 3. ¡Crash ¡Culprit ¡Identification Map ReduceByKey Map Flatmap ReduceByKey Filter Stage ¡2 Stage ¡3 Stage ¡1 Crash occurred at transformation 3 Crashing Record : “Sanders” ArrayIndexOutofBoundException Skipping the record. Continuing processing. A ¡user ¡can ¡see ¡the ¡crash-­‑causing ¡intermediate ¡record ¡and ¡trace ¡the ¡ original ¡inputs ¡leading ¡to ¡the ¡crash. 21

  22. 3. ¡Crash ¡Culprit Remediation Map ReduceByKey Map Flatmap ReduceByKey Filter Stage ¡2 Stage ¡3 Stage ¡1 A ¡user ¡can ¡either ¡correct ¡the ¡crashed ¡record, ¡skip ¡the ¡crash ¡culprit, ¡ or ¡supply ¡a ¡code ¡fix ¡to ¡repair ¡the ¡crash ¡culprit. ¡ 22

  23. 4. ¡Backward ¡and ¡Forward ¡Tracing Map ReduceByKey Map Flatmap ReduceByKey Filter Stage ¡2 Stage ¡3 Stage ¡1 A ¡user ¡can ¡also ¡issue ¡tracing ¡queries ¡on ¡intermediate ¡records ¡at ¡ realtime 23

  24. 4. ¡Backward ¡and ¡Forward ¡Tracing Map ReduceByKey Map Flatmap ReduceByKey Filter Stage ¡2 Stage ¡3 Stage ¡1 A ¡user ¡can ¡also ¡issue ¡tracing ¡queries ¡on ¡intermediate ¡records ¡at ¡ realtime 24

  25. Titian: ¡Data ¡Provenance ¡for ¡Spark ¡[PVLDB2016] Titian ¡instruments ¡Spark ¡jobs ¡with ¡tracing ¡agents ¡to ¡generate ¡fine ¡ grained ¡tracing ¡tables Tracing ¡Table ¡3 Tracing ¡Table ¡2 Tracing ¡Table ¡1 Input Output ¡ Input Output ¡ t x Step ¡1 Input Output ¡ x 0 a y 0 a y 1 c z 25 b … … … … Step ¡2 … … w 10 Input Output ¡ a y b w … … Input Output ¡ 0 a 25 b Titian ¡logically ¡reconstructs ¡mapping ¡from ¡output ¡to ¡input ¡records ¡ by ¡recursively ¡joining ¡the ¡provenance ¡tables 25

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend