Learn R Programming

RStorm (version 1.0)

ShowFinalize: Function to display the name of the finalize function.

Description

Utility function to display the finalize function of a RStorm topology object or display the result of a finalize function of an RStorm result object.

Usage

ShowFinalize(x)

Arguments

x

a topology created using Topology

Value

prints the finalize function of a Topology object.

See Also

See Also: Topology, RStorm, GetHash,

Examples

Run this code
# NOT RUN {
# Simple display of the finalize function itself
topology <- Topology(data.frame(x=c(1:10), y=rep(1,10)))

bolt.1 <- function(x, ...){ SetHash("finalize", data.frame(x=99)) }
topology <- AddBolt(topology, Bolt(bolt.1))

comp.av <- function(object, ...){ 
	return( rep(object$finalize$x, 10)) }

topology <- AddFinalize(topology, Bolt(comp.av))
ShowFinalize(topology)

# and in the result object:
result <- RStorm(topology)
ShowFinalize(result)


# }

Run the code above in your browser using DataLab