Package com.linkedin.davinci.utils
Class ClientRmdSerDe
java.lang.Object
com.linkedin.davinci.utils.ClientRmdSerDe
Similar to
RmdSerDe except it's intended to be used as a utility on
client side to serialize/deserialize RMD record. The main difference is that it doesn't need to handle RMD protocol
evolution and uses the only and latest RMD protocol RmdSchemaGeneratorV1
to generate the corresponding RMD schema used for serialization and deserialization. In the future we can support
RMD protocol evolution by extending StoreSchemaFetcher to fetch the RMD protocol since we don't want clients
to use the controller client as part of a utility for fetching the RMD protocol.-
Constructor Summary
ConstructorsConstructorDescriptionClientRmdSerDe(StoreSchemaFetcher schemaFetcher) ClientRmdSerDe(StoreSchemaFetcher schemaFetcher, boolean fastAvroEnabled) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.avro.generic.GenericRecorddeserializeRmdBytes(int writerSchemaId, int readerSchemaId, ByteBuffer rmdBytes) org.apache.avro.SchemagetRmdSchema(int valueSchemaId) serializeRmdRecord(int valueSchemaId, org.apache.avro.generic.GenericRecord rmdRecord)
-
Constructor Details
-
ClientRmdSerDe
-
ClientRmdSerDe
-
-
Method Details
-
getRmdSchema
public org.apache.avro.Schema getRmdSchema(int valueSchemaId) -
deserializeRmdBytes
public org.apache.avro.generic.GenericRecord deserializeRmdBytes(int writerSchemaId, int readerSchemaId, ByteBuffer rmdBytes) -
serializeRmdRecord
public ByteBuffer serializeRmdRecord(int valueSchemaId, org.apache.avro.generic.GenericRecord rmdRecord)
-