- All Implemented Interfaces:
- java.io.Serializable, org.apache.flink.api.common.functions.Function, org.apache.flink.api.java.functions.KeySelector<org.apache.beam.sdk.util.WindowedValue<org.apache.beam.sdk.values.KV<org.apache.beam.sdk.values.KV<K,V>,java.lang.Double>>,java.nio.ByteBuffer>, org.apache.flink.api.java.typeutils.ResultTypeQueryable<java.nio.ByteBuffer>
public class SdfByteBufferKeySelector<K,V>
extends java.lang.Object
implements org.apache.flink.api.java.functions.KeySelector<org.apache.beam.sdk.util.WindowedValue<org.apache.beam.sdk.values.KV<org.apache.beam.sdk.values.KV<K,V>,java.lang.Double>>,java.nio.ByteBuffer>, org.apache.flink.api.java.typeutils.ResultTypeQueryable<java.nio.ByteBuffer>
KeySelector that retrieves a key from a KV<KV<element, KV<restriction,
watermarkState>>, size>. This will return the element as encoded by the provided Coder
in a ByteBuffer. This ensures that all key comparisons/hashing happen on the encoded
form. Note that the reason we don't use the whole KV<KV<element, KV<restriction,
watermarkState>>, Double> as the key is when checkpoint happens, we will get different
restriction/watermarkState/size, which Flink treats as a new key. Using new key to set state and
timer may cause defined behavior.
- See Also:
- Serialized Form