Class StateMetadata
- java.lang.Object
-
- org.apache.flink.table.planner.plan.nodes.exec.StateMetadata
-
@Internal public class StateMetadata extends Object
It is used to describe the state metadata of a stateful operator, which is serialized/deserialized into/from thoseStreamExecNode
s that can generate stateful operators. For ExecNodes that generatesTwoInputStreamOperator
orMultipleInputStreamOperator
, there will be multiple metadata describing information about each input's state.The metadata describes the following attributes.
stateIndex
: annotates the state is from the i-th input, index based on zerottl
: annotates the state retention time for the i-th input's state, the time unit is ms.name
: annotates the state description, such as deduplicate-state, join-left-state.
-
-
Field Summary
Fields Modifier and Type Field Description static String
FIELD_NAME_STATE_INDEX
static String
FIELD_NAME_STATE_NAME
static String
FIELD_NAME_STATE_TTL
-
Constructor Summary
Constructors Constructor Description StateMetadata(int stateIndex, String stateTtl, String stateName)
StateMetadata(int stateIndex, Duration stateTtl, String stateName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static List<StateMetadata>
getMultiInputOperatorDefaultMeta(Map<Integer,Long> stateTtlFromHint, ReadableConfig tableConfig, String... stateNameList)
static List<StateMetadata>
getOneInputOperatorDefaultMeta(Long stateTtlFromHint, ReadableConfig tableConfig, String stateName)
static List<StateMetadata>
getOneInputOperatorDefaultMeta(ReadableConfig tableConfig, String stateName)
int
getStateIndex()
String
getStateTtl()
static List<Long>
getStateTtlForMultiInputOperator(ExecNodeConfig config, int inputNumOfOperator, List<StateMetadata> stateMetadataList)
static long
getStateTtlForOneInputOperator(ExecNodeConfig config, List<StateMetadata> stateMetadataList)
int
hashCode()
-
-
-
Field Detail
-
FIELD_NAME_STATE_INDEX
public static final String FIELD_NAME_STATE_INDEX
- See Also:
- Constant Field Values
-
FIELD_NAME_STATE_TTL
public static final String FIELD_NAME_STATE_TTL
- See Also:
- Constant Field Values
-
FIELD_NAME_STATE_NAME
public static final String FIELD_NAME_STATE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getStateIndex
public int getStateIndex()
-
getStateTtl
public String getStateTtl()
-
getOneInputOperatorDefaultMeta
public static List<StateMetadata> getOneInputOperatorDefaultMeta(ReadableConfig tableConfig, String stateName)
-
getOneInputOperatorDefaultMeta
public static List<StateMetadata> getOneInputOperatorDefaultMeta(@Nullable Long stateTtlFromHint, ReadableConfig tableConfig, String stateName)
-
getMultiInputOperatorDefaultMeta
public static List<StateMetadata> getMultiInputOperatorDefaultMeta(Map<Integer,Long> stateTtlFromHint, ReadableConfig tableConfig, String... stateNameList)
-
getStateTtlForOneInputOperator
public static long getStateTtlForOneInputOperator(ExecNodeConfig config, @Nullable List<StateMetadata> stateMetadataList)
-
getStateTtlForMultiInputOperator
public static List<Long> getStateTtlForMultiInputOperator(ExecNodeConfig config, int inputNumOfOperator, @Nullable List<StateMetadata> stateMetadataList)
-
-