Class RmdSerDe


  • public class RmdSerDe
    extends java.lang.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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.avro.generic.GenericRecord deserializeRmdBytes​(int writerSchemaID, int readerSchemaID, java.nio.ByteBuffer rmdBytes)
      Given a value schema ID {@param valueSchemaID} and RMD bytes {@param rmdBytes}, 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.
      void deserializeValueSchemaIdPrependedRmdBytes​(byte[] valueSchemaIdPrependedBytes, RmdWithValueSchemaId rmdWithValueSchemaId)
      This method takes in the RMD bytes with prepended value schema ID and a RmdWithValueSchemaId container object.
      org.apache.avro.Schema getRmdSchema​(int valueSchemaId)  
      java.nio.ByteBuffer serializeRmdRecord​(int valueSchemaId, org.apache.avro.generic.GenericRecord rmdRecord)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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,
                                                                         java.nio.ByteBuffer rmdBytes)
        Given a value schema ID {@param valueSchemaID} and RMD bytes {@param rmdBytes}, 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 java.nio.ByteBuffer serializeRmdRecord​(int valueSchemaId,
                                                      org.apache.avro.generic.GenericRecord rmdRecord)
      • getRmdSchema

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