public class SpoutOutputCollector extends java.lang.Object implements ISpoutOutputCollector
IRichSpout
.
The main difference between this output collector and
OutputCollector
for IRichBolt
is that spouts can tag messages with ids so that they can be
acked or failed later on. This is the Spout portion of Storm's API to
guarantee that each message is fully processed at least once.Constructor and Description |
---|
SpoutOutputCollector(ISpoutOutputCollector delegate) |
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)
Emits a tuple to the specified output stream with a null message id.
|
java.util.List<java.lang.Integer> |
emit(java.lang.String streamId,
java.util.List<java.lang.Object> tuple,
java.lang.Object messageId)
Emits a new tuple to the specified output stream with the given message ID.
|
void |
emitDirect(int taskId,
java.util.List<java.lang.Object> tuple)
Emits a tuple to the specified task on the default output stream.
|
void |
emitDirect(int taskId,
java.util.List<java.lang.Object> tuple,
java.lang.Object messageId)
Emits a tuple to the specified task on the default output stream.
|
void |
emitDirect(int taskId,
java.lang.String streamId,
java.util.List<java.lang.Object> tuple)
Emits a tuple to the specified task on the specified output stream.
|
void |
emitDirect(int taskId,
java.lang.String streamId,
java.util.List<java.lang.Object> tuple,
java.lang.Object messageId)
Emits a tuple to the specified task on the specified output stream.
|
void |
reportError(java.lang.Throwable error) |
public SpoutOutputCollector(ISpoutOutputCollector delegate)
public java.util.List<java.lang.Integer> emit(java.lang.String streamId, java.util.List<java.lang.Object> tuple, java.lang.Object messageId)
emit
in interface ISpoutOutputCollector
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.util.List<java.lang.Object> tuple)
public java.util.List<java.lang.Integer> emit(java.lang.String streamId, java.util.List<java.lang.Object> tuple)
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 emitDirect(int taskId, java.util.List<java.lang.Object> tuple, java.lang.Object messageId)
public void emitDirect(int taskId, java.lang.String streamId, java.util.List<java.lang.Object> tuple)
Because no message id is specified, Storm will not track this message so ack and fail will never be called for this tuple.
public void emitDirect(int taskId, java.util.List<java.lang.Object> tuple)
Because no message id is specified, Storm will not track this message so ack and fail will never be called for this tuple.
public void reportError(java.lang.Throwable error)
reportError
in interface ISpoutOutputCollector