Class WorkItemKeySelector<K,​V>

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.api.java.functions.KeySelector<org.apache.beam.sdk.values.WindowedValue<org.apache.beam.runners.core.KeyedWorkItem<K,​V>>,​FlinkKey>, org.apache.flink.api.java.typeutils.ResultTypeQueryable<FlinkKey>

    public class WorkItemKeySelector<K,​V>
    extends java.lang.Object
    implements org.apache.flink.api.java.functions.KeySelector<org.apache.beam.sdk.values.WindowedValue<org.apache.beam.runners.core.KeyedWorkItem<K,​V>>,​FlinkKey>, org.apache.flink.api.java.typeutils.ResultTypeQueryable<FlinkKey>
    KeySelector that retrieves a key from a KeyedWorkItem. This will return the key as encoded by the provided Coder in a ByteBuffer. This ensures that all key comparisons/hashing happen on the encoded form.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      WorkItemKeySelector​(org.apache.beam.sdk.coders.Coder<K> keyCoder)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      FlinkKey getKey​(org.apache.beam.sdk.values.WindowedValue<org.apache.beam.runners.core.KeyedWorkItem<K,​V>> value)  
      org.apache.flink.api.common.typeinfo.TypeInformation<FlinkKey> getProducedType()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WorkItemKeySelector

        public WorkItemKeySelector​(org.apache.beam.sdk.coders.Coder<K> keyCoder)
    • Method Detail

      • getKey

        public FlinkKey getKey​(org.apache.beam.sdk.values.WindowedValue<org.apache.beam.runners.core.KeyedWorkItem<K,​V>> value)
                        throws java.lang.Exception
        Specified by:
        getKey in interface org.apache.flink.api.java.functions.KeySelector<K,​V>
        Throws:
        java.lang.Exception
      • getProducedType

        public org.apache.flink.api.common.typeinfo.TypeInformation<FlinkKey> getProducedType()
        Specified by:
        getProducedType in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<K>