Class CoderHelpers.FromByteFunction<K,​V>

  • Type Parameters:
    K - The type of the key being deserialized.
    V - The type of the value being deserialized.
    All Implemented Interfaces:
    java.io.Serializable, java.util.function.Function<scala.Tuple2<ByteArray,​byte[]>,​scala.Tuple2<K,​V>>, org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Function<scala.Tuple2<ByteArray,​byte[]>,​scala.Tuple2<K,​V>>, org.apache.spark.api.java.function.PairFunction<scala.Tuple2<ByteArray,​byte[]>,​K,​V>
    Enclosing class:
    CoderHelpers

    public static class CoderHelpers.FromByteFunction<K,​V>
    extends java.lang.Object
    implements org.apache.spark.api.java.function.PairFunction<scala.Tuple2<ByteArray,​byte[]>,​K,​V>, org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Function<scala.Tuple2<ByteArray,​byte[]>,​scala.Tuple2<K,​V>>
    A function for converting a byte array pair to a key-value pair.
    See Also:
    Serialized Form
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      scala.Tuple2<K,​V> apply​(scala.Tuple2<ByteArray,​byte[]> tuple)  
      scala.Tuple2<K,​V> call​(scala.Tuple2<ByteArray,​byte[]> tuple)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose
      • Methods inherited from interface org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Function

        equals
    • Constructor Detail

      • FromByteFunction

        public FromByteFunction​(org.apache.beam.sdk.coders.Coder<K> keyCoder,
                                org.apache.beam.sdk.coders.Coder<V> valueCoder)
        Parameters:
        keyCoder - Coder to deserialize keys.
        valueCoder - Coder to deserialize values.
    • Method Detail

      • call

        public scala.Tuple2<K,​V> call​(scala.Tuple2<ByteArray,​byte[]> tuple)
        Specified by:
        call in interface org.apache.spark.api.java.function.PairFunction<scala.Tuple2<ByteArray,​byte[]>,​K,​V>
      • apply

        public scala.Tuple2<K,​V> apply​(@Nonnull
                                             scala.Tuple2<ByteArray,​byte[]> tuple)
        Specified by:
        apply in interface java.util.function.Function<K,​V>
        Specified by:
        apply in interface org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.base.Function<K,​V>