what is action, how it process data in apache spark

Free Online Certification Courses – Learn Today. Lead Tomorrow. Forums Apache Spark what is action, how it process data in apache spark

Viewing 2 reply threads
  • Author
    Posts
    • #5856
      DataFlair TeamDataFlair Team
      Spectator

      Explain briefly what is Action in Apache Spark, how action is used to generate final results ?
      Provide some examples of actions.

    • #5859
      DataFlair TeamDataFlair Team
      Spectator

      Actions return final result of RDD computations/operation.It triggers execution using lineage graph to load the data into original RDD, and carries out all intermediate transformations and returns final result to Driver program or write it out to file system.

      For example: First, take, reduce, collect, count, aggregate are some of the actions in spark.

      Action produces a value back to the Apache Spark driver program. It may trigger a previously constructed, lazy RDD to be evaluated. It is an RDD operations that produce non-RDD values. Action function materializes a value in a Spark program. So basically an action is RDD operation that returns a value of any type but RDD[T] is an action. Actions are one of two ways to send data from executors to the driver (the other being accumulators).

      For detail study of Action refer Transformation and Action in Apache Spark.

    • #5861
      DataFlair TeamDataFlair Team
      Spectator

      Actions are RDD operations that give non-RDD values. Actions return final results of RDDcomputations.
      All the execution the pending transformation are performed once Action is triggered mentioned in lineage graph and return final results to Driver program or write it out to file system.

      Example of actions are:
      take,count,min,max,sum

      For detailed study of RDD operation refer RDD-Transformation and Action.

Viewing 2 reply threads
  • You must be logged in to reply to this topic.