类 ProxyKeyedStateBackend<K>

  • 所有已实现的接口:
    Closeable, AutoCloseable, org.apache.flink.runtime.state.CheckpointableKeyedStateBackend<K>, org.apache.flink.runtime.state.KeyedStateBackend<K>, org.apache.flink.runtime.state.KeyedStateFactory, org.apache.flink.runtime.state.PriorityQueueSetFactory, org.apache.flink.runtime.state.Snapshotable<org.apache.flink.runtime.state.SnapshotResult<org.apache.flink.runtime.state.KeyedStateHandle>>, org.apache.flink.util.Disposable

    public class ProxyKeyedStateBackend<K>
    extends Object
    implements org.apache.flink.runtime.state.CheckpointableKeyedStateBackend<K>
    Proxy KeyedStateBackend for the wrapped operators.
    • 嵌套类概要

      • 从接口继承的嵌套类/接口 org.apache.flink.runtime.state.KeyedStateBackend

        org.apache.flink.runtime.state.KeyedStateBackend.KeySelectionListener<K extends Object>
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      <N,​S extends org.apache.flink.api.common.state.State,​T>
      void
      applyToAllKeys​(N namespace, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.state.StateDescriptor<S,​T> stateDescriptor, org.apache.flink.runtime.state.KeyedStateFunction<K,​S> function)  
      void close()  
      <T extends org.apache.flink.runtime.state.heap.HeapPriorityQueueElement & org.apache.flink.runtime.state.PriorityComparable<? super T> & org.apache.flink.runtime.state.Keyed<?>>
      org.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T>
      create​(String stateName, org.apache.flink.api.common.typeutils.TypeSerializer<T> byteOrderedElementSerializer)  
      <N,​SV,​SEV,​S extends org.apache.flink.api.common.state.State,​IS extends S>
      IS
      createInternalState​(org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.state.StateDescriptor<S,​SV> stateDesc, org.apache.flink.runtime.state.StateSnapshotTransformer.StateSnapshotTransformFactory<SEV> snapshotTransformFactory)  
      protected <S extends org.apache.flink.api.common.state.State,​T>
      org.apache.flink.api.common.state.StateDescriptor<S,​T>
      createNewDescriptor​(org.apache.flink.api.common.state.StateDescriptor<S,​T> descriptor)  
      boolean deregisterKeySelectionListener​(org.apache.flink.runtime.state.KeyedStateBackend.KeySelectionListener<K> listener)  
      void dispose()  
      K getCurrentKey()  
      org.apache.flink.runtime.state.KeyGroupRange getKeyGroupRange()  
      <N> java.util.stream.Stream<K> getKeys​(String state, N namespace)  
      <N> java.util.stream.Stream<org.apache.flink.api.java.tuple.Tuple2<K,​N>> getKeysAndNamespaces​(String state)  
      org.apache.flink.api.common.typeutils.TypeSerializer<K> getKeySerializer()  
      <N,​S extends org.apache.flink.api.common.state.State,​T>
      S
      getOrCreateKeyedState​(org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.state.StateDescriptor<S,​T> stateDescriptor)  
      <N,​S extends org.apache.flink.api.common.state.State>
      S
      getPartitionedState​(N namespace, org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer, org.apache.flink.api.common.state.StateDescriptor<S,​?> stateDescriptor)  
      void registerKeySelectionListener​(org.apache.flink.runtime.state.KeyedStateBackend.KeySelectionListener<K> listener)  
      org.apache.flink.runtime.state.SavepointResources<K> savepoint()  
      void setCurrentKey​(K newKey)  
      RunnableFuture<org.apache.flink.runtime.state.SnapshotResult<org.apache.flink.runtime.state.KeyedStateHandle>> snapshot​(long checkpointId, long timestamp, org.apache.flink.runtime.state.CheckpointStreamFactory streamFactory, org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions)  
      • 从接口继承的方法 org.apache.flink.runtime.state.KeyedStateBackend

        isSafeToReuseKVState, isStateImmutableInStateBackend
      • 从接口继承的方法 org.apache.flink.runtime.state.KeyedStateFactory

        createInternalState
    • 构造器详细资料

      • ProxyKeyedStateBackend

        public ProxyKeyedStateBackend​(org.apache.flink.runtime.state.CheckpointableKeyedStateBackend<K> wrappedBackend,
                                      StateNamePrefix stateNamePrefix)
    • 方法详细资料

      • setCurrentKey

        public void setCurrentKey​(K newKey)
        指定者:
        setCurrentKey 在接口中 org.apache.flink.runtime.state.KeyedStateBackend<K>
      • getCurrentKey

        public K getCurrentKey()
        指定者:
        getCurrentKey 在接口中 org.apache.flink.runtime.state.KeyedStateBackend<K>
      • getKeySerializer

        public org.apache.flink.api.common.typeutils.TypeSerializer<K> getKeySerializer()
        指定者:
        getKeySerializer 在接口中 org.apache.flink.runtime.state.KeyedStateBackend<K>
      • applyToAllKeys

        public <N,​S extends org.apache.flink.api.common.state.State,​T> void applyToAllKeys​(N namespace,
                                                                                                       org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
                                                                                                       org.apache.flink.api.common.state.StateDescriptor<S,​T> stateDescriptor,
                                                                                                       org.apache.flink.runtime.state.KeyedStateFunction<K,​S> function)
                                                                                                throws Exception
        指定者:
        applyToAllKeys 在接口中 org.apache.flink.runtime.state.KeyedStateBackend<K>
        抛出:
        Exception
      • getKeys

        public <N> java.util.stream.Stream<K> getKeys​(String state,
                                                      N namespace)
        指定者:
        getKeys 在接口中 org.apache.flink.runtime.state.KeyedStateBackend<K>
      • getKeysAndNamespaces

        public <N> java.util.stream.Stream<org.apache.flink.api.java.tuple.Tuple2<K,​N>> getKeysAndNamespaces​(String state)
        指定者:
        getKeysAndNamespaces 在接口中 org.apache.flink.runtime.state.KeyedStateBackend<K>
      • getOrCreateKeyedState

        public <N,​S extends org.apache.flink.api.common.state.State,​T> S getOrCreateKeyedState​(org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
                                                                                                           org.apache.flink.api.common.state.StateDescriptor<S,​T> stateDescriptor)
                                                                                                    throws Exception
        指定者:
        getOrCreateKeyedState 在接口中 org.apache.flink.runtime.state.KeyedStateBackend<K>
        抛出:
        Exception
      • getPartitionedState

        public <N,​S extends org.apache.flink.api.common.state.State> S getPartitionedState​(N namespace,
                                                                                                 org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
                                                                                                 org.apache.flink.api.common.state.StateDescriptor<S,​?> stateDescriptor)
                                                                                          throws Exception
        指定者:
        getPartitionedState 在接口中 org.apache.flink.runtime.state.KeyedStateBackend<K>
        抛出:
        Exception
      • registerKeySelectionListener

        public void registerKeySelectionListener​(org.apache.flink.runtime.state.KeyedStateBackend.KeySelectionListener<K> listener)
        指定者:
        registerKeySelectionListener 在接口中 org.apache.flink.runtime.state.KeyedStateBackend<K>
      • deregisterKeySelectionListener

        public boolean deregisterKeySelectionListener​(org.apache.flink.runtime.state.KeyedStateBackend.KeySelectionListener<K> listener)
        指定者:
        deregisterKeySelectionListener 在接口中 org.apache.flink.runtime.state.KeyedStateBackend<K>
      • createInternalState

        @Nonnull
        public <N,​SV,​SEV,​S extends org.apache.flink.api.common.state.State,​IS extends S> IS createInternalState​(@Nonnull
                                                                                                                                        org.apache.flink.api.common.typeutils.TypeSerializer<N> namespaceSerializer,
                                                                                                                                        @Nonnull
                                                                                                                                        org.apache.flink.api.common.state.StateDescriptor<S,​SV> stateDesc,
                                                                                                                                        @Nonnull
                                                                                                                                        org.apache.flink.runtime.state.StateSnapshotTransformer.StateSnapshotTransformFactory<SEV> snapshotTransformFactory)
                                                                                                                                 throws Exception
        指定者:
        createInternalState 在接口中 org.apache.flink.runtime.state.KeyedStateFactory
        抛出:
        Exception
      • createNewDescriptor

        protected <S extends org.apache.flink.api.common.state.State,​T> org.apache.flink.api.common.state.StateDescriptor<S,​T> createNewDescriptor​(org.apache.flink.api.common.state.StateDescriptor<S,​T> descriptor)
      • getKeyGroupRange

        public org.apache.flink.runtime.state.KeyGroupRange getKeyGroupRange()
        指定者:
        getKeyGroupRange 在接口中 org.apache.flink.runtime.state.CheckpointableKeyedStateBackend<K>
      • savepoint

        @Nonnull
        public org.apache.flink.runtime.state.SavepointResources<K> savepoint()
                                                                       throws Exception
        指定者:
        savepoint 在接口中 org.apache.flink.runtime.state.CheckpointableKeyedStateBackend<K>
        抛出:
        Exception
      • dispose

        public void dispose()
        指定者:
        dispose 在接口中 org.apache.flink.util.Disposable
        指定者:
        dispose 在接口中 org.apache.flink.runtime.state.KeyedStateBackend<K>
      • create

        @Nonnull
        public <T extends org.apache.flink.runtime.state.heap.HeapPriorityQueueElement & org.apache.flink.runtime.state.PriorityComparable<? super T> & org.apache.flink.runtime.state.Keyed<?>> org.apache.flink.runtime.state.KeyGroupedInternalPriorityQueue<T> create​(@Nonnull
                                                                                                                                                                                                                                                                          String stateName,
                                                                                                                                                                                                                                                                          @Nonnull
                                                                                                                                                                                                                                                                          org.apache.flink.api.common.typeutils.TypeSerializer<T> byteOrderedElementSerializer)
        指定者:
        create 在接口中 org.apache.flink.runtime.state.PriorityQueueSetFactory
      • snapshot

        @Nonnull
        public RunnableFuture<org.apache.flink.runtime.state.SnapshotResult<org.apache.flink.runtime.state.KeyedStateHandle>> snapshot​(long checkpointId,
                                                                                                                                       long timestamp,
                                                                                                                                       @Nonnull
                                                                                                                                       org.apache.flink.runtime.state.CheckpointStreamFactory streamFactory,
                                                                                                                                       @Nonnull
                                                                                                                                       org.apache.flink.runtime.checkpoint.CheckpointOptions checkpointOptions)
                                                                                                                                throws Exception
        指定者:
        snapshot 在接口中 org.apache.flink.runtime.state.Snapshotable<K>
        抛出:
        Exception