Learn R Programming

RStorm (version 1.0)

Emit: Function to emit a Tuple along the stream. The emitted data x should be a single row of a data.frame.

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

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.

See Also

See Also: Topology, AddBolt, RStorm

Examples

Run this code
# NOT RUN {
	# 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,]), ...)
	
# }

Run the code above in your browser using DataLab