Class AggregatingStateDescriptor<IN,ACC,OUT>
- java.lang.Object
-
- org.apache.flink.runtime.state.v2.StateDescriptor<ACC>
-
- org.apache.flink.runtime.state.v2.AggregatingStateDescriptor<IN,ACC,OUT>
-
- Type Parameters:
IN
- The type of the values that are added to the state.ACC
- The type of the accumulator (intermediate aggregation state).OUT
- The type of the values that are returned from the state.
- All Implemented Interfaces:
Serializable
public class AggregatingStateDescriptor<IN,ACC,OUT> extends StateDescriptor<ACC>
AStateDescriptor
forAggregatingState
.The type internally stored in the state is the type of the
Accumulator
of theAggregateFunction
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.runtime.state.v2.StateDescriptor
StateDescriptor.Type
-
-
Constructor Summary
Constructors Constructor Description AggregatingStateDescriptor(String stateId, org.apache.flink.api.common.functions.AggregateFunction<IN,ACC,OUT> aggregateFunction, org.apache.flink.api.common.typeinfo.TypeInformation<ACC> typeInfo)
Create a new state descriptor with the given name, function, and type.AggregatingStateDescriptor(String stateId, org.apache.flink.api.common.functions.AggregateFunction<IN,ACC,OUT> aggregateFunction, org.apache.flink.api.common.typeinfo.TypeInformation<ACC> typeInfo, org.apache.flink.api.common.serialization.SerializerConfig serializerConfig)
Create a new state descriptor with the given name, function, and type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.flink.api.common.functions.AggregateFunction<IN,ACC,OUT>
getAggregateFunction()
Returns the Aggregate function for this state.StateDescriptor.Type
getType()
Return the specificType
of described state.-
Methods inherited from class org.apache.flink.runtime.state.v2.StateDescriptor
enableTimeToLive, equals, getSerializer, getStateId, getTtlConfig, hashCode, toString
-
-
-
-
Constructor Detail
-
AggregatingStateDescriptor
public AggregatingStateDescriptor(@Nonnull String stateId, @Nonnull org.apache.flink.api.common.functions.AggregateFunction<IN,ACC,OUT> aggregateFunction, @Nonnull org.apache.flink.api.common.typeinfo.TypeInformation<ACC> typeInfo)
Create a new state descriptor with the given name, function, and type.- Parameters:
stateId
- The (unique) name for the state.aggregateFunction
- TheAggregateFunction
used to aggregate the state.typeInfo
- The type of the accumulator. The accumulator is stored in the state.
-
AggregatingStateDescriptor
public AggregatingStateDescriptor(@Nonnull String stateId, @Nonnull org.apache.flink.api.common.functions.AggregateFunction<IN,ACC,OUT> aggregateFunction, @Nonnull org.apache.flink.api.common.typeinfo.TypeInformation<ACC> typeInfo, org.apache.flink.api.common.serialization.SerializerConfig serializerConfig)
Create a new state descriptor with the given name, function, and type.- Parameters:
stateId
- The (unique) name for the state.aggregateFunction
- TheAggregateFunction
used to aggregate the state.typeInfo
- The type of the accumulator. The accumulator is stored in the state.serializerConfig
- The serializer related config used to generate TypeSerializer.
-
-
Method Detail
-
getAggregateFunction
public org.apache.flink.api.common.functions.AggregateFunction<IN,ACC,OUT> getAggregateFunction()
Returns the Aggregate function for this state.
-
getType
public StateDescriptor.Type getType()
Description copied from class:StateDescriptor
Return the specificType
of described state.- Specified by:
getType
in classStateDescriptor<ACC>
-
-