InputT - Input data typeInterT - Intermediate data type (useful for averages)OutputT - Output data typepublic static class NamedAggregators.CombineFunctionState<InputT,InterT,OutputT> extends Object implements NamedAggregators.State<InputT,InterT,OutputT>
| Constructor and Description |
|---|
CombineFunctionState(Combine.CombineFn<InputT,InterT,OutputT> combineFn,
Coder<InputT> inCoder,
SparkRuntimeContext ctxt) |
| Modifier and Type | Method and Description |
|---|---|
InterT |
current() |
Combine.CombineFn<InputT,InterT,OutputT> |
getCombineFn() |
NamedAggregators.State<InputT,InterT,OutputT> |
merge(NamedAggregators.State<InputT,InterT,OutputT> other) |
OutputT |
render() |
void |
update(InputT element) |
public CombineFunctionState(Combine.CombineFn<InputT,InterT,OutputT> combineFn, Coder<InputT> inCoder, SparkRuntimeContext ctxt)
public void update(InputT element)
update in interface NamedAggregators.State<InputT,InterT,OutputT>element - new element to update statepublic NamedAggregators.State<InputT,InterT,OutputT> merge(NamedAggregators.State<InputT,InterT,OutputT> other)
merge in interface NamedAggregators.State<InputT,InterT,OutputT>public InterT current()
current in interface NamedAggregators.State<InputT,InterT,OutputT>public OutputT render()
render in interface NamedAggregators.State<InputT,InterT,OutputT>public Combine.CombineFn<InputT,InterT,OutputT> getCombineFn()
getCombineFn in interface NamedAggregators.State<InputT,InterT,OutputT>Copyright © 2016–2017 The Apache Software Foundation. All rights reserved.