Class MapStateDescriptor<UK,UV>
- java.lang.Object
-
- org.apache.flink.runtime.state.v2.StateDescriptor<UV>
-
- org.apache.flink.runtime.state.v2.MapStateDescriptor<UK,UV>
-
- Type Parameters:
UK
- The type of the user key for this map state.UV
- The type of the values that the map state can hold.
- All Implemented Interfaces:
Serializable
public class MapStateDescriptor<UK,UV> extends StateDescriptor<UV>
StateDescriptor
forMapState
. This can be used to create partitioned map state internally.- 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 MapStateDescriptor(String stateId, TypeInformation<UK> userKeyTypeInfo, TypeInformation<UV> userValueTypeInfo)
Creates a newMapStateDescriptor
with the given stateId and type.MapStateDescriptor(String stateId, TypeInformation<UK> userKeyTypeInfo, TypeInformation<UV> userValueTypeInfo, SerializerConfig serializerConfig)
Creates a newMapStateDescriptor
with the given stateId and type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
StateDescriptor.Type
getType()
Return the specificType
of described state.TypeSerializer<UK>
getUserKeySerializer()
TypeInformation<UK>
getUserKeyType()
-
Methods inherited from class org.apache.flink.runtime.state.v2.StateDescriptor
enableTimeToLive, getSerializer, getStateId, getTtlConfig, hashCode, toString
-
-
-
-
Constructor Detail
-
MapStateDescriptor
public MapStateDescriptor(String stateId, TypeInformation<UK> userKeyTypeInfo, TypeInformation<UV> userValueTypeInfo)
Creates a newMapStateDescriptor
with the given stateId and type.- Parameters:
stateId
- The (unique) stateId for the state.userKeyTypeInfo
- The type of the user keys in the state.userValueTypeInfo
- The type of the values in the state.
-
MapStateDescriptor
public MapStateDescriptor(String stateId, TypeInformation<UK> userKeyTypeInfo, TypeInformation<UV> userValueTypeInfo, SerializerConfig serializerConfig)
Creates a newMapStateDescriptor
with the given stateId and type.- Parameters:
stateId
- The (unique) stateId for the state.userKeyTypeInfo
- The type of the user keys in the state.userValueTypeInfo
- The type of the values in the state.serializerConfig
- The serializer related config used to generateTypeSerializer
.
-
-
Method Detail
-
getUserKeyType
@Nonnull public TypeInformation<UK> getUserKeyType()
-
getUserKeySerializer
@Nonnull public TypeSerializer<UK> getUserKeySerializer()
-
getType
public StateDescriptor.Type getType()
Description copied from class:StateDescriptor
Return the specificType
of described state.- Specified by:
getType
in classStateDescriptor<UV>
-
equals
public final boolean equals(Object o)
- Overrides:
equals
in classStateDescriptor<UV>
-
-