Apache Spark

 
Apache Spark
Lecture by: Faria Kalim (lead TA)
CS425 Fall 2019
UIUC
 
Why Spark?
 
Another system for big data analytics
 
Isn’t MapReduce good enough?
Simplifies batch processing on large commodity clusters
Expensive save to disk for fault tolerance
 
Why Spark?
 
MapReduce can be expensive for some applications e.g.,
Iterative
Interactive
 
Lacks efficient data sharing
 
Specialized frameworks did evolve for different programming
models
Bulk Synchronous Processing (Pregel)
Iterative MapReduce (Haloop) 
.
 
Solution: Resilient Distributed Datasets (RDDs)
 
RDDs
Immutable, partitioned collection of records
Built through coarse grained transformations (map, join 
)
Can be cached for efficient reuse
 
HDFS
Read
Read
Cache
 
RDDs
Immutable, partitioned collection of records
Built through coarse grained, ordered transformations (map, join 
)
 
 
Fault Recovery?
Lineage!
Log the coarse grained operation applied to a partitioned dataset
Simply recompute the lost partition if failure occurs!
No cost if no failure
 
Solution: Resilient Distributed Datasets (RDDs)
HDFS
Read
Read
Cache
Lineage
HDFS
Read
Read
Cache
Lineage
HDFS
Read
Map
RDD
RDD
RDD
RDDs track the graph of transformations that
built them (their lineage) to rebuild lost data
 
What can you do with Spark?
 
RDD operations
Transformations e.g., filter, join, map, group-by 
Actions e.g., count, print 
Control
Partitioning
Persistence
Partitioning
PageRank
Links
(url, neighbors)
Ranks
(url, ranks)
 
Joins take place repeatedly
Good partitioning reduces shuffles
 
Generality
 
RDDs allow unification of different programming models
Stream Processing
Graph Processing
Machine Learning 
..
Gather-Apply-Scatter on GraphX
A
B
D
C
Graph Represented In a Table
Gather-Apply-Scatter on GraphX
A
B
D
C
Gather at A
Gather-Apply-Scatter on GraphX
A
B
D
C
Apply
Gather-Apply-Scatter on GraphX
A
B
D
C
Scatter
 
Summary
 
RDDs provide a simple and efficient programming model
Generalized to a broad set of applications
Leverages coarse-grained nature of parallel algorithms for failure
recovery
Slide Note

2012

Embed
Share

Spark is presented as a solution to the limitations of MapReduce, offering benefits like simplified batch processing on large clusters, fault tolerance, and cost-effectiveness. It introduces Resilient Distributed Datasets (RDDs), explaining their immutability, efficient transformations, and fault recovery mechanisms.

  • Apache Spark
  • Big Data Analytics
  • Resilient Distributed Datasets
  • RDDs
  • Fault Tolerance

Uploaded on Feb 25, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. Apache Spark Lecture by: Faria Kalim (lead TA) CS425 Fall 2019 UIUC

  2. Why Spark? Another system for big data analytics Isn t MapReduce good enough? Simplifies batch processing on large commodity clusters

  3. Expensive save to disk for fault tolerance

  4. Why Spark? MapReduce can be expensive for some applications e.g., Iterative Interactive Lacks efficient data sharing Specialized frameworks did evolve for different programming models Bulk Synchronous Processing (Pregel) Iterative MapReduce (Haloop) .

  5. Solution: Resilient Distributed Datasets (RDDs) RDDs Immutable, partitioned collection of records Built through coarse grained transformations (map, join ) Can be cached for efficient reuse

  6. RDD RDD RDD Read HDFS Cache Read Reduce Map

  7. Solution: Resilient Distributed Datasets (RDDs) RDDs Immutable, partitioned collection of records Built through coarse grained, ordered transformations (map, join ) Fault Recovery? Lineage! Log the coarse grained operation applied to a partitioned dataset Simply recompute the lost partition if failure occurs! No cost if no failure

  8. RDD RDD RDD Read HDFS Cache Read Map Reduce Read Reduce Map Lineage HDFS RDD RDD RDD

  9. RDD RDD RDD Read HDFS Cache RDDs track the graph of transformations that built them (their lineage) to rebuild lost data Read Map Reduce Read Reduce Map Lineage HDFS RDD RDD RDD

  10. What can you do with Spark? RDD operations Transformations e.g., filter, join, map, group-by Actions e.g., count, print Control Partitioning Persistence

  11. Partitioning PageRank Links Ranks (url, ranks) Joins take place repeatedly (url, neighbors) Good partitioning reduces shuffles Contributions Ranks (url, ranks) Contributions

  12. Generality RDDs allow unification of different programming models Stream Processing Graph Processing Machine Learning ..

  13. Gather-Apply-Scatter on GraphX A B Vertices Neighbors B A A B A C A C B C D C B C D C D C Graph Represented In a Table Triplets

  14. Gather-Apply-Scatter on GraphX A B B A A C B C D C D C Group-By A Gather at A

  15. Gather-Apply-Scatter on GraphX A B B A A C B D C C D C Apply Map

  16. Gather-Apply-Scatter on GraphX A B B C A B B A A C C B D C B C A C C D D C Scatter Triplets Join

  17. Summary RDDs provide a simple and efficient programming model Generalized to a broad set of applications Leverages coarse-grained nature of parallel algorithms for failure recovery

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#