Package com.linkedin.venice.serializer
Class FastSerializerDeserializerFactory
- java.lang.Object
-
- com.linkedin.venice.serializer.SerializerDeserializerFactory
-
- com.linkedin.venice.serializer.FastSerializerDeserializerFactory
-
public class FastSerializerDeserializerFactory extends SerializerDeserializerFactory
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.linkedin.venice.serializer.SerializerDeserializerFactory
SerializerDeserializerFactory.SchemaPairAndClassContainer
-
-
Constructor Summary
Constructors Constructor Description FastSerializerDeserializerFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
cacheFastAvroGenericDeserializer(org.apache.avro.Schema writerSchema, org.apache.avro.Schema readerSchema, long warmUpTimeout)
static <V> RecordDeserializer<V>
getFastAvroGenericDeserializer(org.apache.avro.Schema writer, org.apache.avro.Schema reader)
static <K> RecordSerializer<K>
getFastAvroGenericSerializer(org.apache.avro.Schema schema)
static <K> RecordSerializer<K>
getFastAvroGenericSerializer(org.apache.avro.Schema schema, boolean buffered)
static <V extends org.apache.avro.specific.SpecificRecord>
RecordDeserializer<V>getFastAvroSpecificDeserializer(org.apache.avro.Schema writer, java.lang.Class<V> c)
static boolean
verifyWhetherFastGenericDeserializerWorks()
Verify whether fast-avro could generate a fast generic deserializer, but there is no guarantee that the success of all other fast generic deserializer generation in the future.static boolean
verifyWhetherFastSpecificDeserializerWorks(java.lang.Class<? extends org.apache.avro.specific.SpecificRecord> specificClass)
Verify whether fast-avro could generate a fast specific deserializer, but there is no guarantee that the success of all other fast specific deserializer generation in the future.-
Methods inherited from class com.linkedin.venice.serializer.SerializerDeserializerFactory
getAvroGenericDeserializer, getAvroGenericDeserializer, getAvroGenericSerializer, getAvroGenericSerializer, getAvroSpecificDeserializer, getAvroSpecificDeserializer, getAvroSpecificDeserializerInternal, getVsonDeserializer, getVsonSerializer
-
-
-
-
Method Detail
-
verifyWhetherFastSpecificDeserializerWorks
public static boolean verifyWhetherFastSpecificDeserializerWorks(java.lang.Class<? extends org.apache.avro.specific.SpecificRecord> specificClass)
Verify whether fast-avro could generate a fast specific deserializer, but there is no guarantee that the success of all other fast specific deserializer generation in the future. The verification of fast-avro will only happen once, and if we allow it per store client, some of the verification could fail since they will try to write to the same class file.- Returns:
- The returned value indicates whether the fast class generation happens or not for this invocation.
-
verifyWhetherFastGenericDeserializerWorks
public static boolean verifyWhetherFastGenericDeserializerWorks()
Verify whether fast-avro could generate a fast generic deserializer, but there is no guarantee that the success of all other fast generic deserializer generation in the future.- Returns:
- The returned value indicates whether the fast class generation happens or not for this invocation.
-
cacheFastAvroGenericDeserializer
public static void cacheFastAvroGenericDeserializer(org.apache.avro.Schema writerSchema, org.apache.avro.Schema readerSchema, long warmUpTimeout)
-
getFastAvroGenericDeserializer
public static <V> RecordDeserializer<V> getFastAvroGenericDeserializer(org.apache.avro.Schema writer, org.apache.avro.Schema reader)
-
getFastAvroSpecificDeserializer
public static <V extends org.apache.avro.specific.SpecificRecord> RecordDeserializer<V> getFastAvroSpecificDeserializer(org.apache.avro.Schema writer, java.lang.Class<V> c)
-
getFastAvroGenericSerializer
public static <K> RecordSerializer<K> getFastAvroGenericSerializer(org.apache.avro.Schema schema)
-
getFastAvroGenericSerializer
public static <K> RecordSerializer<K> getFastAvroGenericSerializer(org.apache.avro.Schema schema, boolean buffered)
-
-