Class ProducerPartitionState
java.lang.Object
org.apache.avro.specific.SpecificRecordBase
com.linkedin.venice.kafka.protocol.state.ProducerPartitionState
- 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 ProducerPartitionState
extends org.apache.avro.specific.SpecificRecordBase
implements org.apache.avro.specific.SpecificRecord
A record containing the state pertaining to the data sent by one upstream producer into one partition.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionThe aggregates that have been computed so far since the last StartOfSegment ControlMessage.The value of the checksum computed since the last StartOfSegment ControlMessage.intThe current mapping is the following: 0 => None, 1 => MD5, 2 => Adler32, 3 => CRC32.The debug info received as part of the last StartOfSegment ControlMessage.booleanWhether the segment is registered.intThe current message sequence number, within the current segment, which we have seen for this partition/producer pair.longThe timestamp included in the last message we have seen for this partition/producer pair.static final org.apache.avro.SchemaintThe current segment number corresponds to the last (highest) segment number for which we have seen a StartOfSegment control message.intThe status of the current segment: 0 => NOT_STARTED, 1 => IN_PROGRESS, 2 => END_OF_INTERMEDIATE_SEGMENT, 3 => END_OF_FINAL_SEGMENT.
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor.ProducerPartitionState(Integer segmentNumber, Integer segmentStatus, Boolean isRegistered, Integer messageSequenceNumber, Long messageTimestamp, Integer checksumType, ByteBuffer checksumState, Map<CharSequence, Long> aggregates, Map<CharSequence, CharSequence> debugInfo) All-args constructor.
- 
Method SummaryModifier and TypeMethodDescriptionget(int field$) Gets the value of the 'aggregates' field.Gets the value of the 'checksumState' field.intGets the value of the 'checksumType' field.static org.apache.avro.SchemaGets the value of the 'debugInfo' field.booleanGets the value of the 'isRegistered' field.intGets the value of the 'messageSequenceNumber' field.longGets the value of the 'messageTimestamp' field.org.apache.avro.SchemaintGets the value of the 'segmentNumber' field.intGets the value of the 'segmentStatus' field.org.apache.avro.specific.SpecificDatavoidvoidvoidsetAggregates(Map<CharSequence, Long> value) Sets the value of the 'aggregates' field.voidsetChecksumState(ByteBuffer value) Sets the value of the 'checksumState' field.voidsetChecksumType(int value) Sets the value of the 'checksumType' field.voidsetDebugInfo(Map<CharSequence, CharSequence> value) Sets the value of the 'debugInfo' field.voidsetIsRegistered(boolean value) Sets the value of the 'isRegistered' field.voidsetMessageSequenceNumber(int value) Sets the value of the 'messageSequenceNumber' field.voidsetMessageTimestamp(long value) Sets the value of the 'messageTimestamp' field.voidsetSegmentNumber(int value) Sets the value of the 'segmentNumber' field.voidsetSegmentStatus(int value) Sets the value of the 'segmentStatus' field.voidMethods inherited from class org.apache.avro.specific.SpecificRecordBasecompareTo, customDecode, customEncode, equals, get, getConversion, getConversion, hasCustomCoders, hashCode, put, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.avro.generic.GenericRecordhasField
- 
Field Details- 
SCHEMA$public static final org.apache.avro.Schema SCHEMA$
- 
segmentNumberpublic int segmentNumberThe current segment number corresponds to the last (highest) segment number for which we have seen a StartOfSegment control message.
- 
segmentStatuspublic int segmentStatusThe status of the current segment: 0 => NOT_STARTED, 1 => IN_PROGRESS, 2 => END_OF_INTERMEDIATE_SEGMENT, 3 => END_OF_FINAL_SEGMENT.
- 
isRegisteredpublic boolean isRegisteredWhether the segment is registered. i.e. received Start_Of_Segment to initialize the segment.
- 
messageSequenceNumberpublic int messageSequenceNumberThe current message sequence number, within the current segment, which we have seen for this partition/producer pair.
- 
messageTimestamppublic long messageTimestampThe timestamp included in the last message we have seen for this partition/producer pair.
- 
checksumTypepublic int checksumTypeThe current mapping is the following: 0 => None, 1 => MD5, 2 => Adler32, 3 => CRC32.
- 
checksumStateThe value of the checksum computed since the last StartOfSegment ControlMessage.
- 
aggregatesThe aggregates that have been computed so far since the last StartOfSegment ControlMessage.
- 
debugInfoThe debug info received as part of the last StartOfSegment ControlMessage.
 
- 
- 
Constructor Details- 
ProducerPartitionStatepublic ProducerPartitionState()Default constructor. Note that this does not initialize fields to their default values from the schema. If that is desired then one should usenewBuilder().
- 
ProducerPartitionStatepublic ProducerPartitionState(Integer segmentNumber, Integer segmentStatus, Boolean isRegistered, Integer messageSequenceNumber, Long messageTimestamp, Integer checksumType, ByteBuffer checksumState, Map<CharSequence, Long> aggregates, Map<CharSequence, CharSequence> debugInfo) All-args constructor.- Parameters:
- segmentNumber- The current segment number corresponds to the last (highest) segment number for which we have seen a StartOfSegment control message.
- segmentStatus- The status of the current segment: 0 => NOT_STARTED, 1 => IN_PROGRESS, 2 => END_OF_INTERMEDIATE_SEGMENT, 3 => END_OF_FINAL_SEGMENT.
- isRegistered- Whether the segment is registered. i.e. received Start_Of_Segment to initialize the segment.
- messageSequenceNumber- The current message sequence number, within the current segment, which we have seen for this partition/producer pair.
- messageTimestamp- The timestamp included in the last message we have seen for this partition/producer pair.
- checksumType- The current mapping is the following: 0 => None, 1 => MD5, 2 => Adler32, 3 => CRC32.
- checksumState- The value of the checksum computed since the last StartOfSegment ControlMessage.
- aggregates- The aggregates that have been computed so far since the last StartOfSegment ControlMessage.
- debugInfo- The debug info received as part of the last StartOfSegment ControlMessage.
 
 
- 
- 
Method Details- 
getClassSchemapublic static org.apache.avro.Schema getClassSchema()
- 
getSpecificDatapublic org.apache.avro.specific.SpecificData getSpecificData()- Overrides:
- getSpecificDatain class- org.apache.avro.specific.SpecificRecordBase
 
- 
getSchemapublic org.apache.avro.Schema getSchema()- Specified by:
- getSchemain interface- org.apache.avro.generic.GenericContainer
- Specified by:
- getSchemain class- org.apache.avro.specific.SpecificRecordBase
 
- 
get- Specified by:
- getin interface- org.apache.avro.generic.IndexedRecord
- Specified by:
- getin class- org.apache.avro.specific.SpecificRecordBase
 
- 
put- Specified by:
- putin interface- org.apache.avro.generic.IndexedRecord
- Specified by:
- putin class- org.apache.avro.specific.SpecificRecordBase
 
- 
getSegmentNumberpublic int getSegmentNumber()Gets the value of the 'segmentNumber' field.- Returns:
- The current segment number corresponds to the last (highest) segment number for which we have seen a StartOfSegment control message.
 
- 
setSegmentNumberpublic void setSegmentNumber(int value) Sets the value of the 'segmentNumber' field. The current segment number corresponds to the last (highest) segment number for which we have seen a StartOfSegment control message.- Parameters:
- value- the value to set.
 
- 
getSegmentStatuspublic int getSegmentStatus()Gets the value of the 'segmentStatus' field.- Returns:
- The status of the current segment: 0 => NOT_STARTED, 1 => IN_PROGRESS, 2 => END_OF_INTERMEDIATE_SEGMENT, 3 => END_OF_FINAL_SEGMENT.
 
- 
setSegmentStatuspublic void setSegmentStatus(int value) Sets the value of the 'segmentStatus' field. The status of the current segment: 0 => NOT_STARTED, 1 => IN_PROGRESS, 2 => END_OF_INTERMEDIATE_SEGMENT, 3 => END_OF_FINAL_SEGMENT.- Parameters:
- value- the value to set.
 
- 
getIsRegisteredpublic boolean getIsRegistered()Gets the value of the 'isRegistered' field.- Returns:
- Whether the segment is registered. i.e. received Start_Of_Segment to initialize the segment.
 
- 
setIsRegisteredpublic void setIsRegistered(boolean value) Sets the value of the 'isRegistered' field. Whether the segment is registered. i.e. received Start_Of_Segment to initialize the segment.- Parameters:
- value- the value to set.
 
- 
getMessageSequenceNumberpublic int getMessageSequenceNumber()Gets the value of the 'messageSequenceNumber' field.- Returns:
- The current message sequence number, within the current segment, which we have seen for this partition/producer pair.
 
- 
setMessageSequenceNumberpublic void setMessageSequenceNumber(int value) Sets the value of the 'messageSequenceNumber' field. The current message sequence number, within the current segment, which we have seen for this partition/producer pair.- Parameters:
- value- the value to set.
 
- 
getMessageTimestamppublic long getMessageTimestamp()Gets the value of the 'messageTimestamp' field.- Returns:
- The timestamp included in the last message we have seen for this partition/producer pair.
 
- 
setMessageTimestamppublic void setMessageTimestamp(long value) Sets the value of the 'messageTimestamp' field. The timestamp included in the last message we have seen for this partition/producer pair.- Parameters:
- value- the value to set.
 
- 
getChecksumTypepublic int getChecksumType()Gets the value of the 'checksumType' field.- Returns:
- The current mapping is the following: 0 => None, 1 => MD5, 2 => Adler32, 3 => CRC32.
 
- 
setChecksumTypepublic void setChecksumType(int value) Sets the value of the 'checksumType' field. The current mapping is the following: 0 => None, 1 => MD5, 2 => Adler32, 3 => CRC32.- Parameters:
- value- the value to set.
 
- 
getChecksumStateGets the value of the 'checksumState' field.- Returns:
- The value of the checksum computed since the last StartOfSegment ControlMessage.
 
- 
setChecksumStateSets the value of the 'checksumState' field. The value of the checksum computed since the last StartOfSegment ControlMessage.- Parameters:
- value- the value to set.
 
- 
getAggregatesGets the value of the 'aggregates' field.- Returns:
- The aggregates that have been computed so far since the last StartOfSegment ControlMessage.
 
- 
setAggregatesSets the value of the 'aggregates' field. The aggregates that have been computed so far since the last StartOfSegment ControlMessage.- Parameters:
- value- the value to set.
 
- 
getDebugInfoGets the value of the 'debugInfo' field.- Returns:
- The debug info received as part of the last StartOfSegment ControlMessage.
 
- 
setDebugInfoSets the value of the 'debugInfo' field. The debug info received as part of the last StartOfSegment ControlMessage.- Parameters:
- value- the value to set.
 
- 
writeExternal- Specified by:
- writeExternalin interface- Externalizable
- Overrides:
- writeExternalin class- org.apache.avro.specific.SpecificRecordBase
- Throws:
- IOException
 
- 
readExternal- Specified by:
- readExternalin interface- Externalizable
- Overrides:
- readExternalin class- org.apache.avro.specific.SpecificRecordBase
- Throws:
- IOException
 
 
-