Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to be able to create that KeyedStateBackend without the overhead of the AbstractKeyedStateBackend we suggest extracting an interface InternalKeyedStateBackend  interface CheckpointableKeyedStateBackend  similarly to the current OperatorStateStore .

Code Block
/**
 * An interface that extends user facing {@link KeyedStateBackend} with internal system specific features.
 */
public interface InternalKeyedStateBackend<K>CheckpointableKeyedStateBackend<K> extends
		KeyedStateBackend<K>,
		SnapshotStrategy<SnapshotResult<KeyedStateHandle>>,
		Closeable,
		CheckpointListener {

	KeyGroupRange getKeyGroupRange();
}

...

Code Block
@PublicEvolving
public interface StateBackend extends java.io.Serializable {	

.... 

	<K> InternalKeyedStateBackend<K>CheckpointableKeyedStateBackend<K> createKeyedStateBackend(
		Environment env,
		JobID jobID,
		String operatorIdentifier,
		TypeSerializer<K> keySerializer,
		int numberOfKeyGroups,
		KeyGroupRange keyGroupRange,
		TaskKvStateRegistry kvStateRegistry,
		TtlTimeProvider ttlTimeProvider,
		MetricGroup metricGroup,
		@Nonnull Collection<KeyedStateHandle> stateHandles,
		CloseableRegistry cancelStreamRegistry) throws Exception;

}

...