public class SpoutOutputCollectorImpl extends SpoutOutputCollector
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 |
---|
SpoutOutputCollectorImpl(SpoutOutputCollector 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 SpoutOutputCollectorImpl(SpoutOutputCollector delegate)
public java.util.List<java.lang.Integer> emit(java.lang.String streamId, java.util.List<java.lang.Object> tuple, java.lang.Object messageId)
SpoutOutputCollector
emit
in interface ISpoutOutputCollector
emit
in class SpoutOutputCollector
public java.util.List<java.lang.Integer> emit(java.util.List<java.lang.Object> tuple, java.lang.Object messageId)
SpoutOutputCollector
emit
in class SpoutOutputCollector
public java.util.List<java.lang.Integer> emit(java.util.List<java.lang.Object> tuple)
SpoutOutputCollector
emit
in class SpoutOutputCollector
public java.util.List<java.lang.Integer> emit(java.lang.String streamId, java.util.List<java.lang.Object> tuple)
SpoutOutputCollector
emit
in class SpoutOutputCollector
public void emitDirect(int taskId, java.lang.String streamId, java.util.List<java.lang.Object> tuple, java.lang.Object messageId)
SpoutOutputCollector
emitDirect
in interface ISpoutOutputCollector
emitDirect
in class SpoutOutputCollector
public void emitDirect(int taskId, java.util.List<java.lang.Object> tuple, java.lang.Object messageId)
SpoutOutputCollector
emitDirect
in class SpoutOutputCollector
public void emitDirect(int taskId, java.lang.String streamId, java.util.List<java.lang.Object> tuple)
SpoutOutputCollector
Because no message id is specified, Storm will not track this message so ack and fail will never be called for this tuple.
emitDirect
in class SpoutOutputCollector
public void emitDirect(int taskId, java.util.List<java.lang.Object> tuple)
SpoutOutputCollector
Because no message id is specified, Storm will not track this message so ack and fail will never be called for this tuple.
emitDirect
in class SpoutOutputCollector
public void reportError(java.lang.Throwable error)
reportError
in interface ISpoutOutputCollector
reportError
in class SpoutOutputCollector