Packages

package coders

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Package Members

  1. package instances

Type Members

  1. trait AnnotatedKryoRegistrar extends AnyRef

    Trait to be added to Kryo registrar class annotated with @KryoRegistrar.

  2. final case class Beam[T] extends Coder[T] with Product with Serializable
  3. sealed trait Coder[T] extends Serializable
    Annotations
    @implicitNotFound("""
    Cannot find an implicit Coder instance for type:

    >> ${T}

    This can happen for a few reasons, but the most common case is that a data
    member somewhere within this type doesn't have an implicit Coder instance in scope.

    Here are some debugging hints:
    - For Option types, ensure that a Coder instance is in scope for the non-Option version.
    - For List and Seq types, ensure that a Coder instance is in scope for a single element.
    - For generic methods, you may need to add an implicit parameter so that
    def foo[T](coll: SCollection[SomeClass], param: String): SCollection[T]

    may become:
    def foo[T](coll: SCollection[SomeClass],
    param: String)(implicit c: Coder[T]): SCollection[T]
    ^
    Alternatively, you can use a context bound instead of an implicit parameter:
    def foo[T: Coder](coll: SCollection[SomeClass], param: String): SCollection[T]
    ^
    read more here: https://spotify.github.io/scio/migrations/v0.7.0-Migration-Guide#add-missing-context-bounds

    - You can check that an instance exists for Coder in the REPL or in your code:
    scala> com.spotify.scio.coders.Coder[Foo]
    And find the missing instance and construct it as needed.
    """
    )
  4. sealed trait CoderGrammar extends AnyRef

    Coder Grammar is used to explicitly specify Coder derivation for types used in pipelines.

    Coder Grammar is used to explicitly specify Coder derivation for types used in pipelines.

    The CoderGrammar can be used as follows: - To find the Coder being implicitly derived by Scio. (Debugging)

    def c: Coder[MyType] = Coder[MyType]

    - To generate an implicit instance to be in scope for type T, use Coder.gen

    implicit def coderT: Coder[T] = Coder.gen[T]

    Note: Implicit Coders for all parameters of the constructor of type T should be in scope for Coder.gen to be able to derive the Coder.

    - To define a Coder of custom type, where the type can be mapped to some other type for which a Coder is known, use Coder.xmap

    - To explicitly use kryo Coder use Coder.kryo

  5. final case class Disjunction[T, Id] extends Coder[T] with Product with Serializable
  6. final case class Fallback[T] extends Coder[T] with Product with Serializable
  7. final case class KVCoder[K, V] extends Coder[KV[K, V]] with Product with Serializable
  8. macro class KryoRegistrar extends Annotation with StaticAnnotation

    Annotation for custom Kryo registrar classes.

    Annotation for custom Kryo registrar classes.

    Annotated class must extend IKryoRegistrar and has name that ends with "KryoRegistrar".

    Annotations
    @compileTimeOnly("enable macro paradise (2.12) or -Ymacro-annotations (2.13) to expand macro annotations")
  9. trait LowPriorityCoderDerivation extends AnyRef
  10. trait LowPriorityCoders extends LowPriorityCoderDerivation
  11. final case class RawBeam[T] extends Coder[T] with Product with Serializable
  12. final case class Record[T] extends Coder[T] with Product with Serializable
  13. final case class Transform[A, B] extends Coder[B] with Product with Serializable

Ungrouped