This topic contains 2 replies, has 1 voice, and was last updated by  dfbdteam5 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #5856

    dfbdteam5
    Moderator

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

    #5859

    dfbdteam5
    Moderator

    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

    dfbdteam5
    Moderator

    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 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.