Skip to content


[[creating-instance]] StateStoreProviderId is a unique identifier of a StateStoreProvider with the following properties:

In other words, StateStoreProviderId is a <> with the <> that is different every restart.

StateStoreProviderId is used by the following execution components:

StateStoreProviderId is <> (directly or using <> factory method) when:

Creating StateStoreProviderId

  stateInfo: StatefulOperatorStateInfo,
  partitionIndex: Int,
  storeName: String): StateStoreProviderId

apply simply creates a <> for the StatefulOperatorStateInfo, the partition and the store name.

Internally, apply requests the StatefulOperatorStateInfo for the checkpoint directory (checkpointLocation) and the stateful operator ID and creates a new StateStoreId (with the partitionIndex and storeName).

In the end, apply requests the StatefulOperatorStateInfo for the run ID of a streaming query and creates a <> (together with the run ID).

apply is used when:

Last update: 2020-11-28