@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
Coders
to specify how data is encoded to and
decoded from byte strings.See: Description
Interface | Description |
---|---|
CoderProviderRegistrar | |
DelegateCoder.CodingFunction<InputT,OutputT> |
A
CodingFunction<InputT, OutputT> is a serializable
function from InputT to OutputT that may throw any Exception . |
Class | Description |
---|---|
AtomicCoder<T> | |
AvroCoder<T> |
A
Coder using Avro binary format. |
BigDecimalCoder |
A
BigDecimalCoder encodes a BigDecimal as an integer scale encoded with VarIntCoder and a BigInteger encoded using BigIntegerCoder . |
BigEndianIntegerCoder |
A
BigEndianIntegerCoder encodes Integers in 4 bytes, big-endian. |
BigEndianLongCoder |
A
BigEndianLongCoder encodes Long s in 8 bytes, big-endian. |
BigEndianShortCoder |
A
BigEndianShortCoder encodes Shorts in 4 bytes, big-endian. |
BigIntegerCoder |
A
BigIntegerCoder encodes a BigInteger as a byte array containing the big endian
two's-complement representation, encoded via ByteArrayCoder . |
BitSetCoder |
Coder for
BitSet . |
BooleanCoder |
A
Coder for Boolean . |
ByteArrayCoder |
A
Coder for byte[] . |
ByteCoder |
A
ByteCoder encodes Byte values in 1 byte using Java serialization. |
Coder<T> |
A
Coder<T> defines how to encode and decode values of type T into
byte streams. |
Coder.Context | Deprecated
To implement a coder, do not use any
Coder.Context . |
CoderProvider |
A
CoderProvider provides Coder s. |
CoderProviders |
Static utility methods for creating and working with
CoderProvider s. |
CoderRegistry | |
CollectionCoder<T> | |
CustomCoder<T> |
An abstract base class that implements all methods of
Coder except Coder.encode(T, java.io.OutputStream)
and Coder.decode(java.io.InputStream) . |
DefaultCoder.DefaultCoderProviderRegistrar |
A
CoderProviderRegistrar that registers a CoderProvider which can use the
@DefaultCoder annotation to provide coder providers that creates
Coder s. |
DelegateCoder<T,IntermediateT> |
A
DelegateCoder<T, IntermediateT> wraps a Coder for IntermediateT and
encodes/decodes values of type T by converting to/from IntermediateT and then
encoding/decoding using the underlying Coder<IntermediateT> . |
DoubleCoder |
A
DoubleCoder encodes Double values in 8 bytes using Java serialization. |
DurationCoder | |
FloatCoder |
A
FloatCoder encodes Float values in 8 bytes using Java serialization. |
InstantCoder | |
IterableCoder<T> | |
IterableLikeCoder<T,IterableT extends java.lang.Iterable<T>> |
An abstract base class with functionality for assembling a
Coder for a class that
implements Iterable . |
KvCoder<K,V> |
A
KvCoder encodes KV s. |
LengthPrefixCoder<T> |
A
Coder which is able to take any existing coder and wrap it such that it is only invoked
in the outer context . |
ListCoder<T> | |
MapCoder<K,V> |
A
Coder for Maps that encodes them according to provided coders for keys and
values. |
NullableCoder<T> |
A
NullableCoder encodes nullable values of type T using a nested Coder<T>
that does not tolerate null values. |
RowCoder | |
RowCoderGenerator | |
SerializableCoder<T extends java.io.Serializable> |
A
Coder for Java classes that implement Serializable . |
SerializableCoder.SerializableCoderProviderRegistrar |
A
CoderProviderRegistrar which registers a CoderProvider which can handle
serializable types. |
SetCoder<T> | |
ShardedKeyCoder<KeyT> | |
SnappyCoder<T> |
Wraps an existing coder with Snappy compression.
|
StringDelegateCoder<T> |
A
Coder that wraps a Coder<String> and encodes/decodes values via string
representations. |
StringUtf8Coder |
A
Coder that encodes Strings in UTF-8 encoding. |
StructuralByteArray |
A wrapper around a byte[] that uses structural, value-based equality rather than byte[]'s normal
object identity.
|
StructuredCoder<T> |
An abstract base class to implement a
Coder that defines equality, hashing, and printing
via the class name and recursively using StructuredCoder.getComponents() . |
TextualIntegerCoder |
A
Coder that encodes Integer Integers as the ASCII bytes of their textual,
decimal, representation. |
VarIntCoder |
A
Coder that encodes Integers using between 1 and 5 bytes. |
VarLongCoder |
A
Coder that encodes Longs using between 1 and 10 bytes. |
VoidCoder |
A
Coder for Void . |
Enum | Description |
---|---|
CannotProvideCoderException.ReasonCode |
Indicates the reason that
Coder inference failed. |
Exception | Description |
---|---|
CannotProvideCoderException |
The exception thrown when a
CoderRegistry or CoderProvider cannot provide a
Coder that has been requested. |
Coder.NonDeterministicException |
Exception thrown by
Coder.verifyDeterministic() if the encoding is not deterministic,
including details of why the encoding is not deterministic. |
CoderException |
An
Exception thrown if there is a problem encoding or decoding a value. |
Annotation Type | Description |
---|---|
DefaultCoder |
The
DefaultCoder annotation specifies a Coder class to handle encoding and
decoding instances of the annotated class. |
Coders
to specify how data is encoded to and
decoded from byte strings.
During execution of a Pipeline, elements in a PCollection
may need to be encoded into byte strings. This happens both at the beginning and end of a
pipeline when data is read from and written to persistent storage and also during execution of a
pipeline when elements are communicated between machines.
Exactly when PCollection elements are encoded during execution depends on which PipelineRunner
is being used and how that runner chooses to execute the
pipeline. As such, Beam requires that all PCollections have an appropriate Coder in case it
becomes necessary. In many cases, the Coder can be inferred from the available Java type
information and the Pipeline's CoderRegistry
. It can be
specified per PCollection via PCollection.setCoder(Coder)
or
per type using the DefaultCoder
annotation.
This package provides a number of coders for common types like Integer
, String
, and List
, as well as coders like AvroCoder
that can be used to encode many custom types.