Class OptimizedKafkaValueSerializer
java.lang.Object
com.linkedin.venice.serialization.avro.InternalAvroSpecificSerializer<KafkaMessageEnvelope>
com.linkedin.venice.serialization.avro.KafkaValueSerializer
com.linkedin.venice.serialization.avro.OptimizedKafkaValueSerializer
- All Implemented Interfaces:
VeniceKafkaSerializer<KafkaMessageEnvelope>
,Closeable
,AutoCloseable
,org.apache.kafka.common.serialization.Deserializer<KafkaMessageEnvelope>
,org.apache.kafka.common.serialization.Serializer<KafkaMessageEnvelope>
This class is to reuse the original array for put payload of each message
to reduce the unnecessary byte array allocation.
-
Field Summary
Fields inherited from class com.linkedin.venice.serialization.avro.InternalAvroSpecificSerializer
MAX_ATTEMPTS_FOR_SCHEMA_READER, SENTINEL_PROTOCOL_VERSION_USED_FOR_UNDETECTABLE_COMPILED_SCHEMA, SENTINEL_PROTOCOL_VERSION_USED_FOR_UNVERSIONED_PROTOCOL, VENICE_SCHEMA_READER_CONFIG, WAIT_TIME_BETWEEN_SCHEMA_READER_ATTEMPTS_IN_MS
-
Constructor Summary
ConstructorDescriptionOptimizedKafkaValueSerializer
(BiConsumer<Integer, org.apache.avro.Schema> newSchemaEncountered) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.avro.io.BinaryDecoder
createBinaryDecoder
(byte[] bytes, int offset, int length, org.apache.avro.io.BinaryDecoder reuse) Methods inherited from class com.linkedin.venice.serialization.avro.InternalAvroSpecificSerializer
close, configure, deserialize, deserialize, deserialize, deserialize, deserialize, getCompiledProtocol, knownProtocols, removeAllSchemas, serialize, serialize, setSchemaReader
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.kafka.common.serialization.Deserializer
deserialize
Methods inherited from interface org.apache.kafka.common.serialization.Serializer
serialize
-
Constructor Details
-
OptimizedKafkaValueSerializer
public OptimizedKafkaValueSerializer() -
OptimizedKafkaValueSerializer
public OptimizedKafkaValueSerializer(BiConsumer<Integer, org.apache.avro.Schema> newSchemaEncountered)
-
-
Method Details
-
createBinaryDecoder
protected org.apache.avro.io.BinaryDecoder createBinaryDecoder(byte[] bytes, int offset, int length, org.apache.avro.io.BinaryDecoder reuse) - Overrides:
createBinaryDecoder
in classInternalAvroSpecificSerializer<KafkaMessageEnvelope>
-