Emit: Function to emit a 'Tuple' along the stream. The emitted data...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/rstorm.R

Description

Function to emit a Tuple along the stream. The emitted data x should be a single row of a data.frame. Tuples are the main data format passed around in an RStorm stream, and each emitted object is checked by the Emit function to be of class Tuple.

Usage

1
Emit(x, .name = NULL, ...)

Arguments

x

a Tuple. The only arguments that needs to be provided by the user.

.name

(internal) the name of the emitter. Used internally.

...

Additional arguments.

Value

TRUE. The Emit function does not return anything but rather adds the emitted Tuple to the internal list of emitted objects to be used by Spouts listening to the Spout or Bolt from which the data is emitted. The ... argument always needs to be passed in a call to Emit() since it facilitates the internal working of the RStorm.

Author(s)

Maurits Kaptein

See Also

See Also: Topology, AddBolt, RStorm

Examples

1
2
3
4
5
6
7
	# This example can only be run within a Stream.
	# If run outside the Steam the Emit function will issue an error.
	## Not run: 
		x <- data.frame(var1 = c("test", "test2"), var2 = c(2,5))
		Emit(Tuple(x[1,]), ...)
	
## End(Not run)

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

Related to Emit in RStorm...