Class RmdUtils

java.lang.Object
com.linkedin.venice.schema.rmd.RmdUtils

public class RmdUtils extends Object
Ths class is responsible for deserializing RMDs and extract some information from it. It borrows some methods from RmdSerDe.
  • Constructor Details

    • RmdUtils

      public RmdUtils()
  • Method Details

    • getRmdTimestampType

      public static RmdTimestampType getRmdTimestampType(Object tsObject)
      Returns the type of union record given tsObject is. Right now it will be either root level long or generic record of per field timestamp.
      Parameters:
      tsObject -
    • extractOffsetVectorSumFromRmd

      public static long extractOffsetVectorSumFromRmd(org.apache.avro.generic.GenericRecord replicationMetadataRecord)
    • extractOffsetVectorFromRmd

      public static List<Long> extractOffsetVectorFromRmd(org.apache.avro.generic.GenericRecord replicationMetadataRecord)
    • extractTimestampFromRmd

      public static List<Long> extractTimestampFromRmd(org.apache.avro.generic.GenericRecord replicationMetadataRecord)
    • sumOffsetVector

      public static long sumOffsetVector(Object offsetVector)
      Returns a summation of all component parts to an offsetVector for vector comparison
      Parameters:
      offsetVector - offsetVector to be summed
      Returns:
      the sum of all offset vectors
    • hasOffsetAdvanced

      public static boolean hasOffsetAdvanced(@NotNull List<Long> baseOffset, @NotNull List<Long> advancedOffset)
      Checks to see if an offset vector has advanced completely beyond some base offset vector or not.
      Parameters:
      baseOffset - The vector to compare against.
      advancedOffset - The vector has should be advanced along.
      Returns:
      True if the advancedOffset vector has grown beyond the baseOffset