AddFinalize: Function to add a finalize function to a 'Topology'

Description Arguments Value Author(s) See Also Examples

View source: R/topology.R

Description

AddFinalize is an auxiliary function for building up a RStorm topology. After initializing a Topology object the AddFinalize function can be used to add a final function, which receives as its parameter a list of all hashMaps stored during the stream. After running the stream GetHashList can be used to receive an object that is the same as the object received by the finalize function.

Arguments

topology

a Topology object to add the bolt to.

bolt

a Bolt to add to as the finalize function.

.verbose

a logical indicator to state whether or not verbose output should be printed.

Value

An object of type Topology which is a list containing the following elements:

spout

the data.frame passed as a spout

bolts

a list of bolts, see Bolt

finailze

the finalize function to be used for the stream

The specified Bolt has now been added to the finalize function. See Topology for more info.

Author(s)

Maurits Kaptein

See Also

See Also: Topology, Bolt, RStorm

Examples

1
2
3
4
	bolt1 <- function(x, ...){print(x)}
	topology <- Topology(data.frame(x=c(1:10)))
	topology <- AddFinalize(topology, Bolt(bolt1))
	topology

RStorm documentation built on May 2, 2019, 9:14 a.m.

Related to AddFinalize in RStorm...