public class SpoutOutputCollector extends 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 |
|---|---|
List<Integer> |
emit(List<Object> tuple)
Emits a tuple to the default output stream with a null message id.
|
List<Integer> |
emit(List<Object> tuple,
Object messageId)
Emits a new tuple to the default output stream with the given message ID.
|
List<Integer> |
emit(String streamId,
List<Object> tuple)
Emits a tuple to the specified output stream with a null message id.
|
List<Integer> |
emit(String streamId,
List<Object> tuple,
Object messageId)
Emits a new tuple to the specified output stream with the given message ID.
|
void |
emitDirect(int taskId,
List<Object> tuple)
Emits a tuple to the specified task on the default output stream.
|
void |
emitDirect(int taskId,
List<Object> tuple,
Object messageId)
Emits a tuple to the specified task on the default output stream.
|
void |
emitDirect(int taskId,
String streamId,
List<Object> tuple)
Emits a tuple to the specified task on the specified output stream.
|
void |
emitDirect(int taskId,
String streamId,
List<Object> tuple,
Object messageId)
Emits a tuple to the specified task on the specified output stream.
|
void |
flush() |
long |
getPendingCount() |
void |
reportError(Throwable error) |
public SpoutOutputCollector(ISpoutOutputCollector delegate)
public List<Integer> emit(String streamId, List<Object> tuple, Object messageId)
emit in interface ISpoutOutputCollectorpublic List<Integer> emit(List<Object> tuple, Object messageId)
public List<Integer> emit(List<Object> tuple)
public List<Integer> emit(String streamId, List<Object> tuple)
public void emitDirect(int taskId,
String streamId,
List<Object> tuple,
Object messageId)
emitDirect in interface ISpoutOutputCollectorpublic void emitDirect(int taskId,
List<Object> tuple,
Object messageId)
public void emitDirect(int taskId,
String streamId,
List<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,
List<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 flush()
flush in interface ISpoutOutputCollectorpublic void reportError(Throwable error)
reportError in interface IErrorReporterpublic long getPendingCount()
getPendingCount in interface ISpoutOutputCollectorCopyright © 2023 The Apache Software Foundation. All rights reserved.