public interface TridentCollector
Trident components that have the ability to emit tuples to a stream are passed an instance of this interface.
For example, to emit a new tuple to a stream, you would do something like the following:
```java collector.emit(new Values("a", "b", "c")); ```
Modifier and Type | Method and Description |
---|---|
void |
emit(List<Object> values)
Emits a tuple to a Stream.
|
void |
flush()
Flush any buffered tuples (when batching is enabled).
|
void |
reportError(Throwable t)
Reports an error.
|
void emit(List<Object> values)
values
- a list of values of which the tuple will be composedvoid flush()
void reportError(Throwable t)
Note that calling this method does not alter the processing of a batch. To explicitly fail a batch and trigger
a replay, components should throw FailedException
.
t
- The instance of the error (Throwable) being reported.Copyright © 2023 The Apache Software Foundation. All rights reserved.