Action triggers the entire DAG (Directed Acyclic Graph) of transformations built so far to be materialized by running the code blocks and functions. All operations are now executed as the DAG specifies.
There are two kinds of action operations:
- Driver: One kind of action is the driver action such as collect count, count by key, and so on. Each such action performs some calculations on the remote executor and pulls the data back into the driver.
Driver-based action has the problem that actions on large datasets can easily overwhelm the memory available on the driver taking down the application, so you should use the driver involved actions judiciously
- Distributed: Another kind of action is a distributed action, which is executed ...