Learn two ways to create parallel collections.
- [Narrator] Let's create some parallel collections.…We'll start the scala REPL.…Now, there are two ways to create a parallel collection.…We can convert a sequential collection…into a parallel collection,…or we can create a variable…or value with a parallel collection type.…We'll look at examples of both.…So first, let's create a range of a hundred integers,…and I'll call that val range,…or rng for short, 100,…and set that one to 100.…
Now, I want to create a parallel version,…using the par method.…I'll do that creating a parallel range 100,…which is simply equal to the range we just created,…with the par method applied.…Notice the type of this object is…scala.collection.parallel.immutable.ParRange…ParRange is the parallel version…of the sequential range object.…Let's type the name of the parallel range…followed by a period and then hit the tab key.…
Notice the list of methods includes things like BuilderOps,…par, range, iterator, SSCTask,…SignallingOps, and TaskOps.…These are operations that are not…in the sequential version of the range object.…
Dan also focuses on using Scala with Spark, a distributed processing platform. He first describes how to work with Resilient Distributed Datasets (RDDs)—a fundamental Spark data structure—and then explains how to use Scala with Spark DataFrames, a new class of data structure specially designed for analytic processing. He wraps up the course by providing a summary of advantages of using Scala for data science.
- The advantages of Scala for data science
- Scala data types
- Scala arrays, vectors, and ranges
- Parallel processing in Scala
- Mapping functions over parallel collections
- When and when not to use parallel collections
- Using SQL in Scala
- Scala and Spark RDDs
- Scala and Spark DataFrames
- Creating DataFrames
Skill Level Intermediate
Java for Data Scientists Essential Trainingwith Charles Kelly2h 43m Intermediate
1. Introduction to Scala
2. Parallel Processing in Scala
3. Using SQL in Scala
4. Scala and Spark RDDs
5. Scala and Spark DataFrames
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.