public class OutputCollector extends Object implements IOutputCollector
| Constructor and Description |
|---|
OutputCollector(IOutputCollector delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
ack(Tuple input) |
List<Integer> |
emit(Collection<Tuple> anchors,
List<Object> tuple)
Emits a new tuple to the default stream anchored on a group of input tuples.
|
List<Integer> |
emit(List<Object> tuple)
Emits a new unanchored tuple to the default stream.
|
List<Integer> |
emit(String streamId,
Collection<Tuple> anchors,
List<Object> tuple)
Returns the task ids that received the tuples.
|
List<Integer> |
emit(String streamId,
List<Object> tuple)
Emits a new unanchored tuple to the specified stream.
|
List<Integer> |
emit(String streamId,
Tuple anchor,
List<Object> tuple)
Emits a new tuple to a specific stream with a single anchor.
|
List<Integer> |
emit(Tuple anchor,
List<Object> tuple)
Emits a new tuple to the default stream anchored on a single tuple.
|
void |
emitDirect(int taskId,
Collection<Tuple> anchors,
List<Object> tuple)
Emits a tuple directly to the specified task id on the default stream.
|
void |
emitDirect(int taskId,
List<Object> tuple)
Emits a tuple directly to the specified task id on the default stream.
|
void |
emitDirect(int taskId,
String streamId,
Collection<Tuple> anchors,
List<Object> tuple) |
void |
emitDirect(int taskId,
String streamId,
List<Object> tuple)
Emits a tuple directly to the specified task id on the specified stream.
|
void |
emitDirect(int taskId,
String streamId,
Tuple anchor,
List<Object> tuple)
Emits a tuple directly to the specified task id on the specified stream.
|
void |
emitDirect(int taskId,
Tuple anchor,
List<Object> tuple)
Emits a tuple directly to the specified task id on the default stream.
|
void |
fail(Tuple input) |
void |
flush() |
void |
reportError(Throwable error) |
void |
resetTimeout(Tuple input)
Resets the message timeout for any tuple trees to which the given tuple belongs.
|
public OutputCollector(IOutputCollector delegate)
public List<Integer> emit(String streamId, Tuple anchor, List<Object> tuple)
streamId - the stream to emit toanchor - the tuple to anchor totuple - the new output tuple from this boltpublic List<Integer> emit(String streamId, List<Object> tuple)
streamId - the stream to emit totuple - the new output tuple from this boltpublic List<Integer> emit(Collection<Tuple> anchors, List<Object> tuple)
anchors - the tuples to anchor totuple - the new output tuple from this boltpublic List<Integer> emit(Tuple anchor, List<Object> tuple)
anchor - the tuple to anchor totuple - the new output tuple from this boltpublic List<Integer> emit(List<Object> tuple)
tuple - the new output tuple from this boltpublic List<Integer> emit(String streamId, Collection<Tuple> anchors, List<Object> tuple)
IOutputCollectoremit in interface IOutputCollectorpublic void emitDirect(int taskId,
String streamId,
Tuple anchor,
List<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,
String streamId,
List<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,
Collection<Tuple> anchors,
List<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 toanchors - the tuples to anchor totuple - the new output tuple from this boltpublic void emitDirect(int taskId,
Tuple anchor,
List<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,
List<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 void emitDirect(int taskId,
String streamId,
Collection<Tuple> anchors,
List<Object> tuple)
emitDirect in interface IOutputCollectorpublic void ack(Tuple input)
ack in interface IOutputCollectorpublic void fail(Tuple input)
fail in interface IOutputCollectorpublic void resetTimeout(Tuple input)
resetTimeout in interface IOutputCollectorinput - the tuple to reset timeout forpublic void reportError(Throwable error)
reportError in interface IErrorReporterpublic void flush()
flush in interface IOutputCollectorCopyright © 2023 The Apache Software Foundation. All rights reserved.