Class RmdSerDe

java.lang.Object
com.linkedin.davinci.replication.merge.RmdSerDe

public class RmdSerDe extends Object
This class is responsible for serialization and deserialization related tasks. Specifically 3 things: 1. Deserialize RMD from bytes. 2. Serialize RMD record to bytes. 3. Get RMD schema given its value schema ID.
  • Constructor Details

  • Method Details

    • deserializeValueSchemaIdPrependedRmdBytes

      public void deserializeValueSchemaIdPrependedRmdBytes(byte[] valueSchemaIdPrependedBytes, RmdWithValueSchemaId rmdWithValueSchemaId)
      This method takes in the RMD bytes with prepended value schema ID and a RmdWithValueSchemaId container object. It will deserialize the RMD bytes into RMD record and fill the passed-in container.
    • deserializeRmdBytes

      public org.apache.avro.generic.GenericRecord deserializeRmdBytes(int writerSchemaID, int readerSchemaID, ByteBuffer rmdBytes)
      Given a value schema ID and RMD bytes , find the RMD schema that corresponds to the given value schema ID and use that RMD schema to deserialize RMD bytes in a RMD record.
    • serializeRmdRecord

      public ByteBuffer serializeRmdRecord(int valueSchemaId, org.apache.avro.generic.GenericRecord rmdRecord)
    • getRmdSchema

      public org.apache.avro.Schema getRmdSchema(int valueSchemaId)