Class StartOfBufferReplay

java.lang.Object
org.apache.avro.specific.SpecificRecordBase
com.linkedin.venice.kafka.protocol.StartOfBufferReplay
All Implemented Interfaces:
Externalizable, Serializable, Comparable<org.apache.avro.specific.SpecificRecord>, org.apache.avro.generic.GenericContainer, org.apache.avro.generic.GenericRecord, org.apache.avro.generic.IndexedRecord, org.apache.avro.specific.SpecificRecord

public class StartOfBufferReplay extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord
This ControlMessage is sent by the Controller, once per partition, after the EndOfPush ControlMessage, in Hybrid Stores that ingest from both offline and nearline sources. It contains information about the the offsets from which the Buffer Replay Service started replaying data from the real-time buffer topic onto the store-version topic. This can be used as a synchronization marker between the real-time buffer topic and the store-version topic, akin to how a clapperboard is used to synchronize sound and image in filmmaking. This synchronization marker can in turn be used by the consumer to compute an offset lag.
See Also:
  • Field Details

    • SCHEMA$

      public static final org.apache.avro.Schema SCHEMA$
    • sourceOffsets

      public List<Long> sourceOffsets
      Array of offsets from the real-time buffer topic at which the Buffer Replay Service started replaying data. The index position of the array corresponds to the partition number in the real-time buffer.
    • sourceKafkaCluster

      public CharSequence sourceKafkaCluster
      Kafka bootstrap servers URL of the cluster where the source buffer exists.
    • sourceTopicName

      public CharSequence sourceTopicName
      Name of the source buffer topic.
  • Constructor Details

    • StartOfBufferReplay

      public StartOfBufferReplay()
      Default constructor. Note that this does not initialize fields to their default values from the schema. If that is desired then one should use newBuilder().
    • StartOfBufferReplay

      public StartOfBufferReplay(List<Long> sourceOffsets, CharSequence sourceKafkaCluster, CharSequence sourceTopicName)
      All-args constructor.
      Parameters:
      sourceOffsets - Array of offsets from the real-time buffer topic at which the Buffer Replay Service started replaying data. The index position of the array corresponds to the partition number in the real-time buffer.
      sourceKafkaCluster - Kafka bootstrap servers URL of the cluster where the source buffer exists.
      sourceTopicName - Name of the source buffer topic.
  • Method Details

    • getClassSchema

      public static org.apache.avro.Schema getClassSchema()
    • getSpecificData

      public org.apache.avro.specific.SpecificData getSpecificData()
      Overrides:
      getSpecificData in class org.apache.avro.specific.SpecificRecordBase
    • getSchema

      public org.apache.avro.Schema getSchema()
      Specified by:
      getSchema in interface org.apache.avro.generic.GenericContainer
      Specified by:
      getSchema in class org.apache.avro.specific.SpecificRecordBase
    • get

      public Object get(int field$)
      Specified by:
      get in interface org.apache.avro.generic.IndexedRecord
      Specified by:
      get in class org.apache.avro.specific.SpecificRecordBase
    • put

      public void put(int field$, Object value$)
      Specified by:
      put in interface org.apache.avro.generic.IndexedRecord
      Specified by:
      put in class org.apache.avro.specific.SpecificRecordBase
    • getSourceOffsets

      public List<Long> getSourceOffsets()
      Gets the value of the 'sourceOffsets' field.
      Returns:
      Array of offsets from the real-time buffer topic at which the Buffer Replay Service started replaying data. The index position of the array corresponds to the partition number in the real-time buffer.
    • setSourceOffsets

      public void setSourceOffsets(List<Long> value)
      Sets the value of the 'sourceOffsets' field. Array of offsets from the real-time buffer topic at which the Buffer Replay Service started replaying data. The index position of the array corresponds to the partition number in the real-time buffer.
      Parameters:
      value - the value to set.
    • getSourceKafkaCluster

      public CharSequence getSourceKafkaCluster()
      Gets the value of the 'sourceKafkaCluster' field.
      Returns:
      Kafka bootstrap servers URL of the cluster where the source buffer exists.
    • setSourceKafkaCluster

      public void setSourceKafkaCluster(CharSequence value)
      Sets the value of the 'sourceKafkaCluster' field. Kafka bootstrap servers URL of the cluster where the source buffer exists.
      Parameters:
      value - the value to set.
    • getSourceTopicName

      public CharSequence getSourceTopicName()
      Gets the value of the 'sourceTopicName' field.
      Returns:
      Name of the source buffer topic.
    • setSourceTopicName

      public void setSourceTopicName(CharSequence value)
      Sets the value of the 'sourceTopicName' field. Name of the source buffer topic.
      Parameters:
      value - the value to set.
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Specified by:
      writeExternal in interface Externalizable
      Overrides:
      writeExternal in class org.apache.avro.specific.SpecificRecordBase
      Throws:
      IOException
    • readExternal

      public void readExternal(ObjectInput in) throws IOException
      Specified by:
      readExternal in interface Externalizable
      Overrides:
      readExternal in class org.apache.avro.specific.SpecificRecordBase
      Throws:
      IOException