concept Spark in category spark

appears as: Spark, Spark, Spark
Spark in Action, Second Edition

This is an excerpt from Manning's book Spark in Action, Second Edition.

Because your operations are pretty simple (for example, concatenating two fields in a third one), Spark will be very fast.

As you will see in chapters 12 and 13, Spark can join data from multiple datasets and can perform data aggregation, exactly as you do those operations with your relational database. Now imagine that you are joining data from the first partition of worker 1 with data in the second partition of worker 2: all that data will have to be transferred, which is a costly operation.

Figure 2.8 At t5, Spark adds the transformation step to your flow. Each task will continue to perform its work, getting all first and last names from the memory partition to create the new name.
Listing 8.7 Output of join performed at database level, ingested by Spark
+----------+---------+--------------------+--------------------+
|first_name|last_name| title              | description        |
+----------+---------+--------------------+--------------------+
| PENELOPE | GUINESS | ACADEMY DINOSAUR   |A Epic Drama of a...|
| PENELOPE | GUINESS |ANACONDA CONFESSIONS|A Lacklusture Dis...|
| PENELOPE | GUINESS | ANGELS LIFE        |A Thoughtful Disp...|
| PENELOPE | GUINESS |BULWORTH COMMANDM...|A Amazing Display...|
| PENELOPE | GUINESS | CHEAPER CLYDE      |A Emotional Chara...|
+----------+---------+--------------------+--------------------+
only showing top 5 rows
 
root
  |-- first_name: string (nullable = true)
  |-- last_name: string (nullable = true)
  |-- title: string (nullable = true)
  |-- description: string (nullable = true)
 
 The dataframe contains 5462 record(s).