From the course: Scala Essential Training for Data Science
Unlock this course with a free trial
Join today to access over 24,600 courses taught by industry experts.
Creating parallel collections
From the course: Scala Essential Training for Data Science
Creating parallel collections
- [Instructor] We're going to be working with parallel collections, so we'll need to tell the REPL to include some needed dependencies. In particular, we want to work with parallel collections. We do this by using the DEP or dependency argument to the REPL and specify the library we want to load, and then we import that library within the scala REPL. Now, once we've started the REPL, 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 data type. Now I've just moved over to my terminal window. Now the command we will use to start the REPL with the appropriate library loaded is first we use scala, which is what we've used in the past to invoke the REPL. And then we want to specify a dependency argument. And I'm just going to paste that dependency argument in. So we pass in the --dep and then we specify where the library is located. Now, in this case, it's at…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Advantages of parallel collections2m 1s
-
(Locked)
Creating parallel collections4m 1s
-
(Locked)
Challenge Intro: Create Parallel Collections27s
-
(Locked)
Solution: Create parallel collections28s
-
Mapping functions over parallel collections4m 28s
-
(Locked)
Filtering parallel collections4m 55s
-
(Locked)
When and when not to use parallel collections1m 41s
-
(Locked)
-
-
-
-