Class StartOfBufferReplay
- java.lang.Object
-
- org.apache.avro.specific.SpecificRecordBase
-
- com.linkedin.venice.kafka.protocol.StartOfBufferReplay
-
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,java.lang.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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.avro.Schema
SCHEMA$
java.lang.CharSequence
sourceKafkaCluster
Kafka bootstrap servers URL of the cluster where the source buffer exists.java.util.List<java.lang.Long>
sourceOffsets
Array of offsets from the real-time buffer topic at which the Buffer Replay Service started replaying data.java.lang.CharSequence
sourceTopicName
Name of the source buffer topic.
-
Constructor Summary
Constructors Constructor Description StartOfBufferReplay()
Default constructor.StartOfBufferReplay(java.util.List<java.lang.Long> sourceOffsets, java.lang.CharSequence sourceKafkaCluster, java.lang.CharSequence sourceTopicName)
All-args constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
get(int field$)
static org.apache.avro.Schema
getClassSchema()
org.apache.avro.Schema
getSchema()
java.lang.CharSequence
getSourceKafkaCluster()
Gets the value of the 'sourceKafkaCluster' field.java.util.List<java.lang.Long>
getSourceOffsets()
Gets the value of the 'sourceOffsets' field.java.lang.CharSequence
getSourceTopicName()
Gets the value of the 'sourceTopicName' field.org.apache.avro.specific.SpecificData
getSpecificData()
void
put(int field$, java.lang.Object value$)
void
readExternal(java.io.ObjectInput in)
void
setSourceKafkaCluster(java.lang.CharSequence value)
Sets the value of the 'sourceKafkaCluster' field.void
setSourceOffsets(java.util.List<java.lang.Long> value)
Sets the value of the 'sourceOffsets' field.void
setSourceTopicName(java.lang.CharSequence value)
Sets the value of the 'sourceTopicName' field.void
writeExternal(java.io.ObjectOutput out)
-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, customDecode, customEncode, equals, get, getConversion, getConversion, hasCustomCoders, hashCode, put, toString
-
-
-
-
Field Detail
-
SCHEMA$
public static final org.apache.avro.Schema SCHEMA$
-
sourceOffsets
public java.util.List<java.lang.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 java.lang.CharSequence sourceKafkaCluster
Kafka bootstrap servers URL of the cluster where the source buffer exists.
-
sourceTopicName
public java.lang.CharSequence sourceTopicName
Name of the source buffer topic.
-
-
Constructor Detail
-
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 usenewBuilder()
.
-
StartOfBufferReplay
public StartOfBufferReplay(java.util.List<java.lang.Long> sourceOffsets, java.lang.CharSequence sourceKafkaCluster, java.lang.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 Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
-
getSpecificData
public org.apache.avro.specific.SpecificData getSpecificData()
- Overrides:
getSpecificData
in classorg.apache.avro.specific.SpecificRecordBase
-
getSchema
public org.apache.avro.Schema getSchema()
- Specified by:
getSchema
in interfaceorg.apache.avro.generic.GenericContainer
- Specified by:
getSchema
in classorg.apache.avro.specific.SpecificRecordBase
-
get
public java.lang.Object get(int field$)
- Specified by:
get
in interfaceorg.apache.avro.generic.IndexedRecord
- Specified by:
get
in classorg.apache.avro.specific.SpecificRecordBase
-
put
public void put(int field$, java.lang.Object value$)
- Specified by:
put
in interfaceorg.apache.avro.generic.IndexedRecord
- Specified by:
put
in classorg.apache.avro.specific.SpecificRecordBase
-
getSourceOffsets
public java.util.List<java.lang.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(java.util.List<java.lang.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 java.lang.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(java.lang.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 java.lang.CharSequence getSourceTopicName()
Gets the value of the 'sourceTopicName' field.- Returns:
- Name of the source buffer topic.
-
setSourceTopicName
public void setSourceTopicName(java.lang.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(java.io.ObjectOutput out) throws java.io.IOException
- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Overrides:
writeExternal
in classorg.apache.avro.specific.SpecificRecordBase
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException
- Specified by:
readExternal
in interfacejava.io.Externalizable
- Overrides:
readExternal
in classorg.apache.avro.specific.SpecificRecordBase
- Throws:
java.io.IOException
-
-