Categories

Jan 13 in Big Data | Hadoop

Q: What are the common Actions in Apache Spark?

1 Answer

Jan 13

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.

Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

Madanswer
Mar 14 in Spark Sql
Jun 30, 2019 in Spark Sql
Mar 14 in Spark Sql
...