public class BoltOutputCollectorImpl extends java.lang.Object implements IOutputCollector
It will handle the extra work to emit a tuple: For data tuples: 1. Set the anchors for a tuple 2. Pack the tuple and submit the OutgoingTupleCollection's addDataTuple 3. Update the metrics
For Control tuples (ack&fail): 1. Set the anchors for a tuple 2. Pack the tuple and submit the OutgoingTupleCollection's addDataTuple 3. Update the metrics
Constructor and Description |
---|
BoltOutputCollectorImpl(IPluggableSerializer serializer,
PhysicalPlanHelper helper,
Communicator<HeronTuples.HeronTupleSet> streamOutQueue,
BoltMetrics boltMetrics) |
Modifier and Type | Method and Description |
---|---|
void |
ack(Tuple input) |
void |
clear() |
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.
|
void |
emitDirect(int taskId,
java.lang.String streamId,
java.util.Collection<Tuple> anchors,
java.util.List<java.lang.Object> tuple) |
void |
fail(Tuple input) |
long |
getTotalDataEmittedInBytes() |
boolean |
isOutQueuesAvailable() |
void |
reportError(java.lang.Throwable error) |
void |
sendOutTuples() |
public BoltOutputCollectorImpl(IPluggableSerializer serializer, PhysicalPlanHelper helper, Communicator<HeronTuples.HeronTupleSet> streamOutQueue, BoltMetrics boltMetrics)
public 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 reportError(java.lang.Throwable error)
reportError
in interface IErrorReporter
public void ack(Tuple input)
ack
in interface IOutputCollector
public void fail(Tuple input)
fail
in interface IOutputCollector
public boolean isOutQueuesAvailable()
public long getTotalDataEmittedInBytes()
public void sendOutTuples()
public void clear()