Class VeniceMessageCoder<K,V>
java.lang.Object
org.apache.beam.sdk.coders.Coder<T>
org.apache.beam.sdk.coders.StructuredCoder<org.apache.beam.sdk.values.KV<K,ChangeEvent<V>>>
com.linkedin.venice.beam.consumer.VeniceMessageCoder<K,V>
- All Implemented Interfaces:
Serializable
public final class VeniceMessageCoder<K,V>
extends org.apache.beam.sdk.coders.StructuredCoder<org.apache.beam.sdk.values.KV<K,ChangeEvent<V>>>
Uses
KvCoder
to encode/decode PubSubMessage
key
and value.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.beam.sdk.coders.Coder
org.apache.beam.sdk.coders.Coder.Context, org.apache.beam.sdk.coders.Coder.NonDeterministicException
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.beam.sdk.values.KV<K,
ChangeEvent<V>> decode
(InputStream inStream) void
encode
(org.apache.beam.sdk.values.KV<K, ChangeEvent<V>> value, OutputStream outStream) List<? extends org.apache.beam.sdk.coders.Coder<?>>
static <K,
V> VeniceMessageCoder<K, V> of()
void
Methods inherited from class org.apache.beam.sdk.coders.StructuredCoder
equals, getComponents, hashCode, toString
Methods inherited from class org.apache.beam.sdk.coders.Coder
consistentWithEquals, decode, encode, getEncodedElementByteSize, getEncodedTypeDescriptor, isRegisterByteSizeObserverCheap, registerByteSizeObserver, structuralValue, verifyDeterministic, verifyDeterministic
-
Method Details
-
of
-
encode
public void encode(org.apache.beam.sdk.values.KV<K, ChangeEvent<V>> value, OutputStream outStream) throws IOException- Specified by:
encode
in classorg.apache.beam.sdk.coders.Coder<org.apache.beam.sdk.values.KV<K,
ChangeEvent<V>>> - Throws:
IOException
-
decode
public org.apache.beam.sdk.values.KV<K,ChangeEvent<V>> decode(InputStream inStream) throws IOException - Specified by:
decode
in classorg.apache.beam.sdk.coders.Coder<org.apache.beam.sdk.values.KV<K,
ChangeEvent<V>>> - Throws:
IOException
-
getCoderArguments
- Specified by:
getCoderArguments
in classorg.apache.beam.sdk.coders.Coder<org.apache.beam.sdk.values.KV<K,
ChangeEvent<V>>>
-
verifyDeterministic
public void verifyDeterministic()- Specified by:
verifyDeterministic
in classorg.apache.beam.sdk.coders.Coder<org.apache.beam.sdk.values.KV<K,
ChangeEvent<V>>>
-