Description Usage Arguments Value Author(s) See Also Examples
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.
1 | ShowFinalize(x)
|
x |
a topology created using |
prints the finalize function of a Topology object.
Maurits Kaptein
See Also: Topology
, RStorm
, GetHash
,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.