parallel dbs mapreduce
play

Parallel DBs & MapReduce CSE 344 SECTION 10 Big Bi g Data - PowerPoint PPT Presentation

Parallel DBs & MapReduce CSE 344 SECTION 10 Big Bi g Data The Three Vs of Big Data A Brief Story PredicIng the future MapReduce MapReduce Phases WordCount Example Map(int id,


  1. Parallel ¡DBs ¡& ¡MapReduce CSE ¡344 ¡– ¡SECTION ¡10

  2. Big Bi g Data

  3. The ¡Three ¡V’s ¡of ¡Big ¡Data

  4. A ¡Brief ¡Story…

  5. PredicIng ¡the ¡future…

  6. MapReduce

  7. MapReduce ¡Phases

  8. WordCount ¡Example ¡ Map(int ¡id, ¡String[] ¡val) ¡ ¡for ¡word ¡in ¡val: ¡ ¡ ¡emitIntermediate(word, ¡1) ¡ ¡ ¡ ß shuffling ¡ ¡ Reduce(String ¡word, ¡Iterator ¡vals) ¡ ¡cnt ¡= ¡0 ¡ ¡for ¡i ¡in ¡vals: ¡ ¡ ¡cnt ¡++ ¡ ¡emit(cnt) ¡ ¡// ¡emit(word ¡+ ¡‘:’ ¡+ ¡cnt) ¡

  9. Parallel ¡Databases ¡ Shared ¡memory ¡ ¡ Shared ¡disk ¡ ¡ Shared ¡nothing ¡ 9 ¡ CSE ¡344 ¡-­‑ ¡FALL ¡2015 ¡

  10. Shared ¡Memory P P P Interconnection Network Global Shared Memory D D D 10 ¡ CSE ¡344 ¡-­‑ ¡FALL ¡2015 ¡

  11. Shared ¡Disk M M M P P P Interconnection Network D D D 11 ¡ CSE ¡344 ¡-­‑ ¡FALL ¡2015 ¡

  12. Shared ¡Nothing Interconnection Network P P P M M M D D D 12 ¡ CSE ¡344 ¡-­‑ ¡FALL ¡2015 ¡

  13. Horizontal ¡ParIIoning ¡ Block ¡ParVVon ¡vs. ¡Range ¡ParVVon ¡vs. ¡Hash ¡ParVVon ¡

  14. Horizontal ¡Data ¡ParIIoning ¡ Block ¡ParVVon: ¡ ¡ ◦ ParVVon ¡tuples ¡arbitrarily ¡s.t. ¡size(R 1 )≈ ¡… ¡≈ ¡size(R P ) ¡ ¡ ¡ Hash ¡parVVoned ¡on ¡a^ribute ¡A: ¡ ◦ Tuple ¡t ¡goes ¡to ¡chunk ¡i, ¡where ¡i ¡= ¡h(t.A) ¡mod ¡P ¡+ ¡1 ¡ ¡ Range ¡parVVoned ¡on ¡a^ribute ¡A: ¡ ◦ ParVVon ¡the ¡range ¡of ¡A ¡into ¡ ¡-­‑∞ ¡= ¡v 0 ¡< ¡v 1 ¡< ¡… ¡< ¡v P ¡= ¡∞ ¡ ◦ Tuple ¡t ¡goes ¡to ¡chunk ¡i, ¡if ¡v i-­‑1 ¡< ¡t.A ¡< ¡v i ¡ 14 ¡ CSE ¡344 ¡-­‑ ¡FALL ¡2015 ¡

  15. R(a, b) SELECT ¡a, ¡count(b) ¡as ¡countb ¡ ¡ ¡ ¡ FROM ¡R ¡ WHERE ¡a ¡> ¡0 ¡ GROUP ¡BY ¡a Machine 1 Machine 2 Machine 3 1/3 of R 1/3 of R 1/3 of R 15 CSE 344 - FALL 2015

  16. R(a, b) SELECT ¡a, ¡count(b) ¡as ¡countb ¡ ¡ ¡ ¡ FROM ¡R ¡ WHERE ¡a ¡> ¡0 ¡ GROUP ¡BY ¡a scan scan scan Machine 1 Machine 2 Machine 3 1/3 of R 1/3 of R 1/3 of R 16 CSE 344 - FALL 2015

  17. R(a, b) SELECT ¡a, ¡count(b) ¡as ¡countb ¡ ¡ ¡ ¡ FROM ¡R ¡ WHERE ¡a ¡> ¡0 ¡ GROUP ¡BY ¡a σ a>0 σ a>0 σ a>0 scan scan scan Machine 1 Machine 2 Machine 3 1/3 of R 1/3 of R 1/3 of R 17 CSE 344 - FALL 2015

  18. R(a, b) SELECT ¡a, ¡count(b) ¡as ¡countb ¡ ¡ ¡ ¡ FROM ¡R ¡ WHERE ¡a ¡> ¡0 ¡ GROUP ¡BY ¡ ¡a γ a, count(b)-> b γ a, count(b)-> b γ a, count(b)-> b σ a>0 σ a>0 σ a>0 scan scan scan Machine 1 Machine 2 Machine 3 1/3 of R 1/3 of R 1/3 of R 18 CSE 344 - FALL 2015

  19. R(a, b) SELECT ¡a, ¡count(b) ¡as ¡countb ¡ ¡ ¡ ¡ FROM ¡R ¡ WHERE ¡a ¡> ¡0 ¡ GROUP ¡BY ¡a Hash on a Hash on a Hash on a γ a, count(b)-> b γ a, count(b)-> b γ a,count(b)-> b σ a>0 σ a>0 σ a>0 scan scan scan Machine 1 Machine 2 Machine 3 1/3 of R 1/3 of R 1/3 of R 19

  20. SELECT ¡a, ¡count(b) ¡as ¡countb ¡ R(a, b) FROM ¡R ¡WHERE ¡a ¡> ¡0 ¡GROUP ¡BY ¡a Hash on a Hash on a Hash on a γ a, count(b)-> b γ a, count(b)-> b γ a, count(b)-> b σ a>0 σ a>0 σ a>0 scan scan scan Machine 1 Machine 2 Machine 3 1/3 of R 1/3 of R 1/3 of R 20

  21. SELECT ¡a, ¡count(b) ¡as ¡countb ¡ R(a, b) FROM ¡R ¡WHERE ¡a ¡> ¡0 ¡GROUP ¡BY ¡a γ a, sum(b)->countb γ a, sum(b)->countb γ a, sum(b)->countb Hash on a Hash on a Hash on a γ a, count(b)-> b γ a, count(b)-> b γ a, count(b)-> b σ a>0 σ a>0 σ a>0 scan scan scan Machine 1 Machine 2 Machine 3 1/3 of R 1/3 of R 1/3 of R 21

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