March 2019
Beginner to intermediate
182 pages
4h 6m
English
In this section, we'll be looking at the actions on key/value pairs.
We will cover the following topics:
In the first section of this chapter, we covered transformations that are available on key/value pairs. We saw that they are a bit different compared to RDDs. Also, for actions, it is slightly different in terms of result but not in the method name.
Therefore, we'll be using collect() and we'll be examining the output of our action on these key/value pairs.
First, we will create our transactions array and RDD according to userId, as shown in the following example:
val keysWithValuesList = Array( UserTransaction("A", ...Read now
Unlock full access