public class SpoutOutputCollector extends java.lang.Object implements ISpoutOutputCollector
Constructor and Description |
---|
SpoutOutputCollector(java.lang.String spoutId,
TaskContext taskContext,
EdgeFieldMap outFieldsForEdge,
EdgeFieldMap keyedOutEdges)
Initializes a SpoutOutputCollector
|
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.Integer> |
emit(java.util.List<java.lang.Object> tuple)
Emits a tuple to the default output stream with a null message id.
|
java.util.List<java.lang.Integer> |
emit(java.util.List<java.lang.Object> tuple,
java.lang.Object messageId)
Emits a new tuple to the default output stream with the given message ID.
|
java.util.List<java.lang.Integer> |
emit(java.lang.String streamId,
java.util.List<java.lang.Object> tuple,
java.lang.Object messageId)
Returns the task ids that received the tuples.
|
void |
emitDirect(int taskId,
java.lang.String streamId,
java.util.List<java.lang.Object> tuple,
java.lang.Object messageId) |
void |
reportError(java.lang.Throwable error) |
public SpoutOutputCollector(java.lang.String spoutId, TaskContext taskContext, EdgeFieldMap outFieldsForEdge, EdgeFieldMap keyedOutEdges)
taskContext
- the instance of twister2 task contextpublic java.util.List<java.lang.Integer> emit(java.util.List<java.lang.Object> tuple)
public java.util.List<java.lang.Integer> emit(java.util.List<java.lang.Object> tuple, java.lang.Object messageId)
public java.util.List<java.lang.Integer> emit(java.lang.String streamId, java.util.List<java.lang.Object> tuple, java.lang.Object messageId)
ISpoutOutputCollector
emit
in interface ISpoutOutputCollector
public void emitDirect(int taskId, java.lang.String streamId, java.util.List<java.lang.Object> tuple, java.lang.Object messageId)
emitDirect
in interface ISpoutOutputCollector
public void reportError(java.lang.Throwable error)
reportError
in interface ISpoutOutputCollector