StateStoreProviderId¶
[[creating-instance]] StateStoreProviderId is a unique identifier of a StateStoreProvider with the following properties:
- [[storeId]] StateStoreId
- [[queryRunId]] Run ID of a streaming query (java.util.UUID)
In other words, StateStoreProviderId is a <
StateStoreProviderId is used by the following execution components:
-
StateStoreCoordinatorto track the executors of state store providers (on the driver) -
StateStoreobject to manage state store providers (on executors)
StateStoreProviderId is <
-
StateStoreRDDis requested for the placement preferences of a partition and to compute a partition -
StateStoreAwareZipPartitionsRDDis requested for the preferred locations of a partition -
StateStoreHandleris requested to look up a state store
Creating StateStoreProviderId¶
apply(
stateInfo: StatefulOperatorStateInfo,
partitionIndex: Int,
storeName: String): StateStoreProviderId
apply simply creates a <
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 <
apply is used when:
-
StateStoreAwareZipPartitionsRDDis requested for the preferred locations of a partition -
StateStoreHandleris requested to look up a state store