in Big Data | Hadoop by
What are the common Actions in Apache Spark?

► Click here to show 1 Answer

0 votes

Some of the commonly used Actions in Apache Spark are as follows:

1. Reduce(func): This Action aggregates the elements of a dataset by using func function.

2. Count(): This action gives the total number of elements in a Dataset.


3. Collect(): This action will return all the elements of a dataset as an Array to the driver program.

4. First(): This action gives the first element of a collection.

5. Take(n): This action gives the first n elements of dataset.

6. Foreach(func): This action runs each element in dataset through a for loop and executes function func on each element.

Learn More with Madanswer

Related questions

0 votes
asked Mar 14, 2020 in Spark Sql by rajeshsharma