Class ConsumptionStateSnapshot
java.lang.Object
org.apache.avro.specific.SpecificRecordBase
com.linkedin.venice.admin.protocol.response.ConsumptionStateSnapshot
- 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 ConsumptionStateSnapshot
extends org.apache.avro.specific.SpecificRecordBase
implements org.apache.avro.specific.SpecificRecord
Type describes all the version attributes
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionboolean
Whether completion has been reported beforeboolean
Whether the node is consuming remotely for this partitionboolean
Whether deferred write mode is enabled currentlyboolean
Whether error has already been reportedboolean
Whether the store is hybrid.boolean
Whether the store is incremental push enabled.boolean
Whether transition latch is releasedboolean
Whether lag has ever caught up; it doesn't always indicate the current lag statuslong
the last time when the node consumes any message for this partitionSTANDBY; LEADER; IN_TRANSITION_FROM_STANDBY_TO_LEADER; PAUSE_TRANSITION_FROM_STANDBY_TO_LEADEROffset checkpoint info and DIV infoint
The partition which this state snapshot belongs to.long
How much bytes have been processed since last syncstatic final org.apache.avro.Schema
-
Constructor Summary
ConstructorDescriptionDefault constructor.ConsumptionStateSnapshot
(Integer partitionId, Boolean hybrid, Boolean isIncrementalPushEnabled, Object offsetRecord, Boolean deferredWrite, Boolean errorReported, Boolean lagCaughtUp, Boolean completionReported, CharSequence leaderState, Boolean isLatchReleased, Long processedRecordSizeSinceLastSync, Boolean consumeRemotely, Long latestMessageConsumptionTimestampInMs) All-args constructor. -
Method Summary
Modifier and TypeMethodDescriptionget
(int field$) static org.apache.avro.Schema
boolean
Gets the value of the 'completionReported' field.boolean
Gets the value of the 'consumeRemotely' field.boolean
Gets the value of the 'deferredWrite' field.boolean
Gets the value of the 'errorReported' field.boolean
Gets the value of the 'hybrid' field.boolean
Gets the value of the 'isIncrementalPushEnabled' field.boolean
Gets the value of the 'isLatchReleased' field.boolean
Gets the value of the 'lagCaughtUp' field.long
Gets the value of the 'latestMessageConsumptionTimestampInMs' field.Gets the value of the 'leaderState' field.Gets the value of the 'offsetRecord' field.int
Gets the value of the 'partitionId' field.long
Gets the value of the 'processedRecordSizeSinceLastSync' field.org.apache.avro.Schema
org.apache.avro.specific.SpecificData
void
void
void
setCompletionReported
(boolean value) Sets the value of the 'completionReported' field.void
setConsumeRemotely
(boolean value) Sets the value of the 'consumeRemotely' field.void
setDeferredWrite
(boolean value) Sets the value of the 'deferredWrite' field.void
setErrorReported
(boolean value) Sets the value of the 'errorReported' field.void
setHybrid
(boolean value) Sets the value of the 'hybrid' field.void
setIsIncrementalPushEnabled
(boolean value) Sets the value of the 'isIncrementalPushEnabled' field.void
setIsLatchReleased
(boolean value) Sets the value of the 'isLatchReleased' field.void
setLagCaughtUp
(boolean value) Sets the value of the 'lagCaughtUp' field.void
setLatestMessageConsumptionTimestampInMs
(long value) Sets the value of the 'latestMessageConsumptionTimestampInMs' field.void
setLeaderState
(CharSequence value) Sets the value of the 'leaderState' field.void
setOffsetRecord
(Object value) Sets the value of the 'offsetRecord' field.void
setPartitionId
(int value) Sets the value of the 'partitionId' field.void
setProcessedRecordSizeSinceLastSync
(long value) Sets the value of the 'processedRecordSizeSinceLastSync' field.void
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, customDecode, customEncode, equals, get, getConversion, getConversion, hasCustomCoders, hashCode, put, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.avro.generic.GenericRecord
hasField
-
Field Details
-
SCHEMA$
public static final org.apache.avro.Schema SCHEMA$ -
partitionId
public int partitionIdThe partition which this state snapshot belongs to. -
hybrid
public boolean hybridWhether the store is hybrid. -
isIncrementalPushEnabled
public boolean isIncrementalPushEnabledWhether the store is incremental push enabled. -
offsetRecord
Offset checkpoint info and DIV info -
deferredWrite
public boolean deferredWriteWhether deferred write mode is enabled currently -
errorReported
public boolean errorReportedWhether error has already been reported -
lagCaughtUp
public boolean lagCaughtUpWhether lag has ever caught up; it doesn't always indicate the current lag status -
completionReported
public boolean completionReportedWhether completion has been reported before -
leaderState
STANDBY; LEADER; IN_TRANSITION_FROM_STANDBY_TO_LEADER; PAUSE_TRANSITION_FROM_STANDBY_TO_LEADER -
isLatchReleased
public boolean isLatchReleasedWhether transition latch is released -
processedRecordSizeSinceLastSync
public long processedRecordSizeSinceLastSyncHow much bytes have been processed since last sync -
consumeRemotely
public boolean consumeRemotelyWhether the node is consuming remotely for this partition -
latestMessageConsumptionTimestampInMs
public long latestMessageConsumptionTimestampInMsthe last time when the node consumes any message for this partition
-
-
Constructor Details
-
ConsumptionStateSnapshot
public ConsumptionStateSnapshot()Default constructor. Note that this does not initialize fields to their default values from the schema. If that is desired then one should usenewBuilder()
. -
ConsumptionStateSnapshot
public ConsumptionStateSnapshot(Integer partitionId, Boolean hybrid, Boolean isIncrementalPushEnabled, Object offsetRecord, Boolean deferredWrite, Boolean errorReported, Boolean lagCaughtUp, Boolean completionReported, CharSequence leaderState, Boolean isLatchReleased, Long processedRecordSizeSinceLastSync, Boolean consumeRemotely, Long latestMessageConsumptionTimestampInMs) All-args constructor.- Parameters:
partitionId
- The partition which this state snapshot belongs to.hybrid
- Whether the store is hybrid.isIncrementalPushEnabled
- Whether the store is incremental push enabled.offsetRecord
- Offset checkpoint info and DIV infodeferredWrite
- Whether deferred write mode is enabled currentlyerrorReported
- Whether error has already been reportedlagCaughtUp
- Whether lag has ever caught up; it doesn't always indicate the current lag statuscompletionReported
- Whether completion has been reported beforeleaderState
- STANDBY; LEADER; IN_TRANSITION_FROM_STANDBY_TO_LEADER; PAUSE_TRANSITION_FROM_STANDBY_TO_LEADERisLatchReleased
- Whether transition latch is releasedprocessedRecordSizeSinceLastSync
- How much bytes have been processed since last syncconsumeRemotely
- Whether the node is consuming remotely for this partitionlatestMessageConsumptionTimestampInMs
- the last time when the node consumes any message for this partition
-
-
Method Details
-
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
- Specified by:
get
in interfaceorg.apache.avro.generic.IndexedRecord
- Specified by:
get
in classorg.apache.avro.specific.SpecificRecordBase
-
put
- Specified by:
put
in interfaceorg.apache.avro.generic.IndexedRecord
- Specified by:
put
in classorg.apache.avro.specific.SpecificRecordBase
-
getPartitionId
public int getPartitionId()Gets the value of the 'partitionId' field.- Returns:
- The partition which this state snapshot belongs to.
-
setPartitionId
public void setPartitionId(int value) Sets the value of the 'partitionId' field. The partition which this state snapshot belongs to.- Parameters:
value
- the value to set.
-
getHybrid
public boolean getHybrid()Gets the value of the 'hybrid' field.- Returns:
- Whether the store is hybrid.
-
setHybrid
public void setHybrid(boolean value) Sets the value of the 'hybrid' field. Whether the store is hybrid.- Parameters:
value
- the value to set.
-
getIsIncrementalPushEnabled
public boolean getIsIncrementalPushEnabled()Gets the value of the 'isIncrementalPushEnabled' field.- Returns:
- Whether the store is incremental push enabled.
-
setIsIncrementalPushEnabled
public void setIsIncrementalPushEnabled(boolean value) Sets the value of the 'isIncrementalPushEnabled' field. Whether the store is incremental push enabled.- Parameters:
value
- the value to set.
-
getOffsetRecord
Gets the value of the 'offsetRecord' field.- Returns:
- Offset checkpoint info and DIV info
-
setOffsetRecord
Sets the value of the 'offsetRecord' field. Offset checkpoint info and DIV info- Parameters:
value
- the value to set.
-
getDeferredWrite
public boolean getDeferredWrite()Gets the value of the 'deferredWrite' field.- Returns:
- Whether deferred write mode is enabled currently
-
setDeferredWrite
public void setDeferredWrite(boolean value) Sets the value of the 'deferredWrite' field. Whether deferred write mode is enabled currently- Parameters:
value
- the value to set.
-
getErrorReported
public boolean getErrorReported()Gets the value of the 'errorReported' field.- Returns:
- Whether error has already been reported
-
setErrorReported
public void setErrorReported(boolean value) Sets the value of the 'errorReported' field. Whether error has already been reported- Parameters:
value
- the value to set.
-
getLagCaughtUp
public boolean getLagCaughtUp()Gets the value of the 'lagCaughtUp' field.- Returns:
- Whether lag has ever caught up; it doesn't always indicate the current lag status
-
setLagCaughtUp
public void setLagCaughtUp(boolean value) Sets the value of the 'lagCaughtUp' field. Whether lag has ever caught up; it doesn't always indicate the current lag status- Parameters:
value
- the value to set.
-
getCompletionReported
public boolean getCompletionReported()Gets the value of the 'completionReported' field.- Returns:
- Whether completion has been reported before
-
setCompletionReported
public void setCompletionReported(boolean value) Sets the value of the 'completionReported' field. Whether completion has been reported before- Parameters:
value
- the value to set.
-
getLeaderState
Gets the value of the 'leaderState' field.- Returns:
- STANDBY; LEADER; IN_TRANSITION_FROM_STANDBY_TO_LEADER; PAUSE_TRANSITION_FROM_STANDBY_TO_LEADER
-
setLeaderState
Sets the value of the 'leaderState' field. STANDBY; LEADER; IN_TRANSITION_FROM_STANDBY_TO_LEADER; PAUSE_TRANSITION_FROM_STANDBY_TO_LEADER- Parameters:
value
- the value to set.
-
getIsLatchReleased
public boolean getIsLatchReleased()Gets the value of the 'isLatchReleased' field.- Returns:
- Whether transition latch is released
-
setIsLatchReleased
public void setIsLatchReleased(boolean value) Sets the value of the 'isLatchReleased' field. Whether transition latch is released- Parameters:
value
- the value to set.
-
getProcessedRecordSizeSinceLastSync
public long getProcessedRecordSizeSinceLastSync()Gets the value of the 'processedRecordSizeSinceLastSync' field.- Returns:
- How much bytes have been processed since last sync
-
setProcessedRecordSizeSinceLastSync
public void setProcessedRecordSizeSinceLastSync(long value) Sets the value of the 'processedRecordSizeSinceLastSync' field. How much bytes have been processed since last sync- Parameters:
value
- the value to set.
-
getConsumeRemotely
public boolean getConsumeRemotely()Gets the value of the 'consumeRemotely' field.- Returns:
- Whether the node is consuming remotely for this partition
-
setConsumeRemotely
public void setConsumeRemotely(boolean value) Sets the value of the 'consumeRemotely' field. Whether the node is consuming remotely for this partition- Parameters:
value
- the value to set.
-
getLatestMessageConsumptionTimestampInMs
public long getLatestMessageConsumptionTimestampInMs()Gets the value of the 'latestMessageConsumptionTimestampInMs' field.- Returns:
- the last time when the node consumes any message for this partition
-
setLatestMessageConsumptionTimestampInMs
public void setLatestMessageConsumptionTimestampInMs(long value) Sets the value of the 'latestMessageConsumptionTimestampInMs' field. the last time when the node consumes any message for this partition- Parameters:
value
- the value to set.
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classorg.apache.avro.specific.SpecificRecordBase
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classorg.apache.avro.specific.SpecificRecordBase
- Throws:
IOException
-