|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object backtype.storm.task.OutputCollector
public class OutputCollector
This output collector exposes the API for emitting tuples from an IRichBolt. This is the core API for emitting tuples. For a simpler API, and a more restricted form of stream processing, see IBasicBolt and BasicOutputCollector.
Constructor Summary | |
---|---|
OutputCollector(IOutputCollector delegate)
|
Method Summary | |
---|---|
void |
ack(Tuple input)
|
java.util.List<java.lang.Integer> |
emit(java.util.Collection<Tuple> anchors,
java.util.List<java.lang.Object> tuple)
Emits a new tuple to the default stream anchored on a group of input tuples. |
java.util.List<java.lang.Integer> |
emit(java.util.List<java.lang.Object> tuple)
Emits a new unanchored tuple to the default stream. |
java.util.List<java.lang.Integer> |
emit(java.lang.String streamId,
java.util.Collection<Tuple> anchors,
java.util.List<java.lang.Object> tuple)
Returns the task ids that received the tuples. |
java.util.List<java.lang.Integer> |
emit(java.lang.String streamId,
java.util.List<java.lang.Object> tuple)
Emits a new unanchored tuple to the specified stream. |
java.util.List<java.lang.Integer> |
emit(java.lang.String streamId,
Tuple anchor,
java.util.List<java.lang.Object> tuple)
Emits a new tuple to a specific stream with a single anchor. |
java.util.List<java.lang.Integer> |
emit(Tuple anchor,
java.util.List<java.lang.Object> tuple)
Emits a new tuple to the default stream anchored on a single tuple. |
void |
emitDirect(int taskId,
java.util.Collection<Tuple> anchors,
java.util.List<java.lang.Object> tuple)
Emits a tuple directly to the specified task id on the default stream. |
void |
emitDirect(int taskId,
java.util.List<java.lang.Object> tuple)
Emits a tuple directly to the specified task id on the default stream. |
void |
emitDirect(int taskId,
java.lang.String streamId,
java.util.Collection<Tuple> anchors,
java.util.List<java.lang.Object> tuple)
|
void |
emitDirect(int taskId,
java.lang.String streamId,
java.util.List<java.lang.Object> tuple)
Emits a tuple directly to the specified task id on the specified stream. |
void |
emitDirect(int taskId,
java.lang.String streamId,
Tuple anchor,
java.util.List<java.lang.Object> tuple)
Emits a tuple directly to the specified task id on the specified stream. |
void |
emitDirect(int taskId,
Tuple anchor,
java.util.List<java.lang.Object> tuple)
Emits a tuple directly to the specified task id on the default stream. |
void |
fail(Tuple input)
|
void |
reportError(java.lang.Throwable error)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OutputCollector(IOutputCollector delegate)
Method Detail |
---|
public java.util.List<java.lang.Integer> emit(java.lang.String streamId, Tuple anchor, java.util.List<java.lang.Object> tuple)
streamId
- the stream to emit toanchor
- the tuple to anchor totuple
- the new output tuple from this bolt
public java.util.List<java.lang.Integer> emit(java.lang.String streamId, java.util.List<java.lang.Object> tuple)
streamId
- the stream to emit totuple
- the new output tuple from this bolt
public java.util.List<java.lang.Integer> emit(java.util.Collection<Tuple> anchors, java.util.List<java.lang.Object> tuple)
anchors
- the tuples to anchor totuple
- the new output tuple from this bolt
public java.util.List<java.lang.Integer> emit(Tuple anchor, java.util.List<java.lang.Object> tuple)
anchor
- the tuple to anchor totuple
- the new output tuple from this bolt
public java.util.List<java.lang.Integer> emit(java.util.List<java.lang.Object> tuple)
tuple
- the new output tuple from this bolt
public void emitDirect(int taskId, java.lang.String streamId, Tuple anchor, java.util.List<java.lang.Object> tuple)
taskId
- the taskId to send the new tuple tostreamId
- the stream to send the tuple on. It must be declared as a direct stream in the topology definition.anchor
- the tuple to anchor totuple
- the new output tuple from this boltpublic void emitDirect(int taskId, java.lang.String streamId, java.util.List<java.lang.Object> tuple)
taskId
- the taskId to send the new tuple tostreamId
- the stream to send the tuple on. It must be declared as a direct stream in the topology definition.tuple
- the new output tuple from this boltpublic void emitDirect(int taskId, java.util.Collection<Tuple> anchors, java.util.List<java.lang.Object> tuple)
The default stream must be declared as direct in the topology definition. See OutputDeclarer#declare for how this is done when defining topologies in Java.
taskId
- the taskId to send the new tuple toanchosr
- the tuples to anchor totuple
- the new output tuple from this boltpublic void emitDirect(int taskId, Tuple anchor, java.util.List<java.lang.Object> tuple)
The default stream must be declared as direct in the topology definition. See OutputDeclarer#declare for how this is done when defining topologies in Java.
taskId
- the taskId to send the new tuple toanchor
- the tuple to anchor totuple
- the new output tuple from this boltpublic void emitDirect(int taskId, java.util.List<java.lang.Object> tuple)
The default stream must be declared as direct in the topology definition. See OutputDeclarer#declare for how this is done when defining topologies in Java.
Note that this method does not use anchors, so downstream failures won't affect the failure status of any spout tuples.
taskId
- the taskId to send the new tuple totuple
- the new output tuple from this boltpublic java.util.List<java.lang.Integer> emit(java.lang.String streamId, java.util.Collection<Tuple> anchors, java.util.List<java.lang.Object> tuple)
IOutputCollector
emit
in interface IOutputCollector
public void emitDirect(int taskId, java.lang.String streamId, java.util.Collection<Tuple> anchors, java.util.List<java.lang.Object> tuple)
emitDirect
in interface IOutputCollector
public void ack(Tuple input)
ack
in interface IOutputCollector
public void fail(Tuple input)
fail
in interface IOutputCollector
public void reportError(java.lang.Throwable error)
reportError
in interface IOutputCollector
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |