public class SpoutOutputCollectorImpl extends java.lang.Object implements ISpoutOutputCollector
It will only emit data tuples; it will not send control tuples (ack&fail) 1. Whether some tuples are expired; should be considered as failed automatically 2. The pending tuples to be acked 3. Maintain some statistics, for instance, total tuples emitted.
Constructor and Description |
---|
SpoutOutputCollectorImpl(IPluggableSerializer serializer,
PhysicalPlanHelper helper,
Communicator<HeronTuples.HeronTupleSet> streamOutQueue,
SpoutMetrics spoutMetrics) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
java.util.List<java.lang.Integer> |
emit(java.lang.String streamId,
java.util.List<java.lang.Object> tuple,
java.lang.Object messageId)
Returns the task ids that received the tuples.
|
void |
emitDirect(int taskId,
java.lang.String streamId,
java.util.List<java.lang.Object> tuple,
java.lang.Object messageId) |
java.util.Queue<RootTupleInfo> |
getImmediateAcks() |
long |
getTotalDataEmittedInBytes() |
long |
getTotalTuplesEmitted() |
boolean |
isOutQueuesAvailable() |
int |
numInFlight() |
void |
reportError(java.lang.Throwable error) |
java.util.List<RootTupleInfo> |
retireExpired(long timeout) |
RootTupleInfo |
retireInFlight(long rootId) |
void |
sendOutTuples() |
public SpoutOutputCollectorImpl(IPluggableSerializer serializer, PhysicalPlanHelper helper, Communicator<HeronTuples.HeronTupleSet> streamOutQueue, SpoutMetrics spoutMetrics)
public java.util.List<java.lang.Integer> emit(java.lang.String streamId, java.util.List<java.lang.Object> tuple, java.lang.Object messageId)
ISpoutOutputCollector
emit
in interface ISpoutOutputCollector
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 reportError(java.lang.Throwable error)
reportError
in interface ISpoutOutputCollector
public boolean isOutQueuesAvailable()
public long getTotalDataEmittedInBytes()
public void sendOutTuples()
public long getTotalTuplesEmitted()
public int numInFlight()
public java.util.Queue<RootTupleInfo> getImmediateAcks()
public RootTupleInfo retireInFlight(long rootId)
public java.util.List<RootTupleInfo> retireExpired(long timeout)
public void clear()