SerializableCoder (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1

com.google.cloud.dataflow.sdk.coders

Class SerializableCoder<T extends Serializable>

  • Type Parameters:
    T - the type of elements handled by this coder
    All Implemented Interfaces:
    Coder<T>, Serializable


    public class SerializableCoder<T extends Serializable>
    extends AtomicCoder<T>
    A Coder for Java classes that implement Serializable.

    To use, specify the coder type on a PCollection:

     
       PCollection<MyRecord> records =
           foo.apply(...).setCoder(SerializableCoder.of(MyRecord.class));
     
     

    SerializableCoder does not guarantee a deterministic encoding, as Java serialization may produce different binary encodings for two equivalent objects.

    See Also:
    Serialized Form


Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Dataflow
Need help? Visit our support page.