Hello, in this video we'll be talking about Actions. In previous lectures, we already use one action which is collect. The purpose of this action was to get data, from an RDD distributed across the nodes, back to our driver program. And we saw in the last video, that Spark builds a Directed Acyclic Graph of our data analysis pipeline. And when, we finally choose the last step, which is an action. Finally, a spark sends all the tasks for execution to the nodes. And Collect, or another action like Take, copies the results of the driver. If the results are too large to fit on the driver memory, then there is an opportunity to write them directly to HDFS, instead. So let's see how collect works. In the bottom right corner of the slide, you can find a simple beta processing pipeline, so you can imagine we are reading from HDFS. Applying, if you trust formations, that at the end we have our final results after groupbyKey. And then, at this step, we call collect, and collect would take care of copying all of our results back to the Java virtual machine on the driver program. And then, this will be piped also to our python shell. There are other options. An interesting one is reduce. So we saw already, before, that there is a transformation which is reduced by key. In this case, reduce is similar, so we're still have a function, which is a reduction function, so it takes 2 elements and returns a result like a sum, but in this case, we don't have a key, we have just a large array of some values. And we are running this function, over and over again, to reduce everything to one single value, for example, to the global sum of everything. Then, a very useful action is saveAsTextFile, because this can save the results to HDFS, and this is very useful if the output of the power computation is pretty large.