public class AppendCollector extends Object implements TridentCollector
Constructor and Description |
---|
AppendCollector(TridentContext context) |
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).
|
TridentTuple.Factory |
getOutputFactory() |
void |
reportError(Throwable t)
Reports an error.
|
void |
setContext(ProcessorContext pc,
TridentTuple t) |
public AppendCollector(TridentContext context)
public void setContext(ProcessorContext pc, TridentTuple t)
public void emit(List<Object> values)
TridentCollector
Emits a tuple to a Stream.
emit
in interface TridentCollector
values
- a list of values of which the tuple will be composedpublic void flush()
TridentCollector
Flush any buffered tuples (when batching is enabled).
flush
in interface TridentCollector
public void reportError(Throwable t)
TridentCollector
Reports an error. The corresponding stack trace will be visible in the Storm UI.
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
.
reportError
in interface TridentCollector
t
- The instance of the error (Throwable) being reported.public TridentTuple.Factory getOutputFactory()
Copyright © 2022 The Apache Software Foundation. All rights reserved.