Class CoGbkResult.CoGbkResultCoder
- java.lang.Object
-
- org.apache.beam.sdk.coders.Coder<T>
-
- org.apache.beam.sdk.coders.CustomCoder<CoGbkResult>
-
- org.apache.beam.sdk.transforms.join.CoGbkResult.CoGbkResultCoder
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- CoGbkResult
public static class CoGbkResult.CoGbkResultCoder extends CustomCoder<CoGbkResult>
ACoder
forCoGbkResult
s.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.beam.sdk.coders.Coder
Coder.Context, Coder.NonDeterministicException
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CoGbkResult
decode(java.io.InputStream inStream)
Decodes a value of typeT
from the given input stream in the given context.void
encode(CoGbkResult value, java.io.OutputStream outStream)
Encodes the given value of typeT
onto the given output stream.boolean
equals(@Nullable java.lang.Object object)
java.util.List<? extends Coder<?>>
getCoderArguments()
CoGbkResultSchema
getSchema()
UnionCoder
getUnionCoder()
int
hashCode()
static CoGbkResult.CoGbkResultCoder
of(CoGbkResultSchema schema, UnionCoder unionCoder)
Returns aCoGbkResult.CoGbkResultCoder
for the given schema andUnionCoder
.void
verifyDeterministic()
ThrowCoder.NonDeterministicException
if the coding is not deterministic.-
Methods inherited from class org.apache.beam.sdk.coders.Coder
consistentWithEquals, decode, encode, getEncodedElementByteSize, getEncodedTypeDescriptor, isRegisterByteSizeObserverCheap, registerByteSizeObserver, structuralValue, verifyDeterministic, verifyDeterministic
-
-
-
-
Method Detail
-
of
public static CoGbkResult.CoGbkResultCoder of(CoGbkResultSchema schema, UnionCoder unionCoder)
Returns aCoGbkResult.CoGbkResultCoder
for the given schema andUnionCoder
.
-
getCoderArguments
public java.util.List<? extends Coder<?>> getCoderArguments()
Description copied from class:CustomCoder
If this is aCoder
for a parameterized type, returns the list ofCoder
s being used for each of the parameters in the same order they appear within the parameterized type's type signature. If this cannot be done, or thisCoder
does not encode/decode a parameterized type, returns the empty list..Returns an empty list. A
CustomCoder
has no default argumentcoders
.- Overrides:
getCoderArguments
in classCustomCoder<CoGbkResult>
-
getSchema
public CoGbkResultSchema getSchema()
-
getUnionCoder
public UnionCoder getUnionCoder()
-
encode
public void encode(CoGbkResult value, java.io.OutputStream outStream) throws CoderException, java.io.IOException
Description copied from class:Coder
Encodes the given value of typeT
onto the given output stream.- Specified by:
encode
in classCoder<CoGbkResult>
- Throws:
CoderException
- if the value could not be encoded for some reasonjava.io.IOException
- if writing to theOutputStream
fails for some reason
-
decode
public CoGbkResult decode(java.io.InputStream inStream) throws CoderException, java.io.IOException
Description copied from class:Coder
Decodes a value of typeT
from the given input stream in the given context. Returns the decoded value.- Specified by:
decode
in classCoder<CoGbkResult>
- Throws:
CoderException
- if the value could not be decoded for some reasonjava.io.IOException
- if reading from theInputStream
fails for some reason
-
equals
public boolean equals(@Nullable java.lang.Object object)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
verifyDeterministic
public void verifyDeterministic() throws Coder.NonDeterministicException
Description copied from class:CustomCoder
ThrowCoder.NonDeterministicException
if the coding is not deterministic.In order for a
Coder
to be considered deterministic, the following must be true:- two values that compare as equal (via
Object.equals()
orComparable.compareTo()
, if supported) have the same encoding. - the
Coder
always produces a canonical encoding, which is the same for an instance of an object even if produced on different computers at different times.
- Overrides:
verifyDeterministic
in classCustomCoder<CoGbkResult>
- Throws:
Coder.NonDeterministicException
- aCustomCoder
is presumed nondeterministic.
- two values that compare as equal (via
-
-