Class PubSubMessageCoder<K,V>
java.lang.Object
org.apache.beam.sdk.coders.Coder<T>
org.apache.beam.sdk.coders.StructuredCoder<PubSubMessage<K,ChangeEvent<V>,VeniceChangeCoordinate>>
com.linkedin.venice.beam.consumer.PubSubMessageCoder<K,V>
- All Implemented Interfaces:
Serializable
public class PubSubMessageCoder<K,V>
extends org.apache.beam.sdk.coders.StructuredCoder<PubSubMessage<K,ChangeEvent<V>,VeniceChangeCoordinate>>
Uses
AvroCoder
to encode/decode PubSubMessage
s.- 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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondecode
(InputStream inStream) void
encode
(PubSubMessage<K, ChangeEvent<V>, VeniceChangeCoordinate> value, OutputStream outStream) List<? extends org.apache.beam.sdk.coders.Coder<?>>
static <K,
V> PubSubMessageCoder<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
-
Constructor Details
-
PubSubMessageCoder
public PubSubMessageCoder()
-
-
Method Details
-
of
-
encode
public void encode(PubSubMessage<K, ChangeEvent<V>, throws IOExceptionVeniceChangeCoordinate> value, @Nonnull OutputStream outStream) - Specified by:
encode
in classorg.apache.beam.sdk.coders.Coder<PubSubMessage<K,
ChangeEvent<V>, VeniceChangeCoordinate>> - Throws:
IOException
-
decode
public PubSubMessage<K,ChangeEvent<V>, decodeVeniceChangeCoordinate> (@Nonnull InputStream inStream) throws IOException - Specified by:
decode
in classorg.apache.beam.sdk.coders.Coder<PubSubMessage<K,
ChangeEvent<V>, VeniceChangeCoordinate>> - Throws:
IOException
-
getCoderArguments
- Specified by:
getCoderArguments
in classorg.apache.beam.sdk.coders.Coder<PubSubMessage<K,
ChangeEvent<V>, VeniceChangeCoordinate>>
-
verifyDeterministic
public void verifyDeterministic()- Specified by:
verifyDeterministic
in classorg.apache.beam.sdk.coders.Coder<PubSubMessage<K,
ChangeEvent<V>, VeniceChangeCoordinate>>
-