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

1 Answer

0 votes
by

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.

Related questions

0 votes
asked Feb 5, 2020 in Big Data | Hadoop by SakshiSharma
0 votes
asked Feb 22, 2020 in Big Data | Hadoop by SakshiSharma
...