K
- The type of the key in the bundle mapV
- The type of the value in the bundle mapIN
- Type of the input elements.OUT
- Type of the returned elements.public abstract class MapBundleFunction<K,V,IN,OUT> extends Object implements Function
Modifier and Type | Field and Description |
---|---|
protected ExecutionContext |
ctx |
Constructor and Description |
---|
MapBundleFunction() |
Modifier and Type | Method and Description |
---|---|
abstract V |
addInput(V value,
IN input)
Adds the given input to the given value, returning the new bundle value.
|
void |
close() |
abstract void |
finishBundle(Map<K,V> buffer,
Collector<OUT> out)
Called when a bundle is finished.
|
void |
open(ExecutionContext ctx) |
protected transient ExecutionContext ctx
public void open(ExecutionContext ctx) throws Exception
Exception
public abstract V addInput(@Nullable V value, IN input) throws Exception
value
- the existing bundle value, maybe nullinput
- the given input, not nullException
public abstract void finishBundle(Map<K,V> buffer, Collector<OUT> out) throws Exception
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.