Spark Revolution

Spark tutorial · PySpark.in

Understanding Data Lake Landscape

Before HDFS & MapReduce, we had Data warehouses

(like Teradata, Exadata) where the data is brought from many OLTP/OLAP systems.

The challenges faced by data warehouses are as follows -

Vertical Scaling - adding more DW was expensive

Large Capital Investment

Storage - non-scalable

Support only structured data

To overcome above challenges, Data Lake came into the picture with following features -

Horizontal Scaling - adding more cheap servers to clusters

Low Capital Investment

Storage - scalable (cloud storage)

Support structured, unstructured and semi-structured data

Data Lake Architecture

The core capability of data lake was storage but with timely advancement, it had developed 4 important capabilities –

Let's analyse the below Data Lake architecture for understanding different layers.

Apache Spark &it's Eco-system:

History of Spark :

The Spark was initiated by Matei Zaharia at UC Berkeley's AMP Lab in 2009. It was open sourced in 2010 under a BSD license.

In 2013, the project was acquired by Apache Software Foundation. In 2014, the Spark emerged as a Top-Level Apache Project.

Spark eco-system and it's components :

The Apache Spark ecosystem may be divided into three tiers as indicated in the above diagram.

  1. Storage and Cluster Manager :

2) Spark Core :

Apache Spark core contains two main components -

1) Spark Compute engine

2) Spark Core APIs

  1. Spark Compute engine -

Spark Core APIs –

The Structured APIs consists of data frames and data sets. They are designed and optimized to work with structured data.

The Unstructured APIs are the lower level APIs including RDDs, Accumulators and Broadcast variables. These core APIs are available in Scala, Python, Java, and R.

3) Set of Libraries :

Apache Spark has different set of libraries and packages that make it a powerfull big data processing framework. The set of libraries includeSpark SQL, Spark Streaming, Spark MLlib, and Spark GraphX.

These libraries provide different functionalities for data processing, analysis, and machine learning tasks.

Working :

Spark SQL - Allows you to use SQL queries for structured data processing.

Spark Streaming - Helps you to consume and process continuous data streams.

MLlib - A machine learning library that delivers high-quality algorithms.

GraphX - Comes with a library of typical graph algorithms.

These libraries offer us APIs, DSLs, and algorithms in multiple languages. They directly depend on Spark Core APIs to achieve distributed processing.

More Spark tutorials

All tutorials · Try the free PySpark compiler · Practice challenges