public abstract class WrappingCollector<T> extends AbstractRichFunction implements Collector<T>
Collector
that wraps another collector. An implementation can decide when to emit to
the wrapped collector.Constructor and Description |
---|
WrappingCollector() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Tear-down method for the user code.
|
void |
outputResult(T result)
Outputs the final result to the wrapped collector.
|
void |
setCollector(Collector<T> collector)
Sets the current collector which is used to emit the final result.
|
getIterationRuntimeContext, getRuntimeContext, open, setRuntimeContext
public void setCollector(Collector<T> collector)
public void outputResult(T result)
public void close()
RichFunction
This method can be used for clean up work.
close
in interface RichFunction
close
in interface Collector<T>
close
in class AbstractRichFunction
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.