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>
,java.io.Closeable
,java.lang.AutoCloseable
,org.apache.kafka.common.serialization.Deserializer<KafkaMessageEnvelope>
,org.apache.kafka.common.serialization.Serializer<KafkaMessageEnvelope>
public class OptimizedKafkaValueSerializer extends KafkaValueSerializer
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
Constructors Constructor Description OptimizedKafkaValueSerializer()
OptimizedKafkaValueSerializer(java.util.function.BiConsumer<java.lang.Integer,org.apache.avro.Schema> newSchemaEncountered)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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
-
-
-
-
Method Detail
-
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>
-
-