Class ConsumptionStateSnapshot

  • 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 ConsumptionStateSnapshot
    extends org.apache.avro.specific.SpecificRecordBase
    implements org.apache.avro.specific.SpecificRecord
    Type describes all the version attributes
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      boolean completionReported
      Whether completion has been reported before
      boolean consumeRemotely
      Whether the node is consuming remotely for this partition
      boolean deferredWrite
      Whether deferred write mode is enabled currently
      boolean errorReported
      Whether error has already been reported
      boolean hybrid
      Whether the store is hybrid.
      boolean isIncrementalPushEnabled
      Whether the store is incremental push enabled.
      boolean isLatchReleased
      Whether transition latch is released
      boolean lagCaughtUp
      Whether lag has ever caught up; it doesn't always indicate the current lag status
      long latestMessageConsumptionTimestampInMs
      the last time when the node consumes any message for this partition
      java.lang.CharSequence leaderState
      STANDBY; LEADER; IN_TRANSITION_FROM_STANDBY_TO_LEADER; PAUSE_TRANSITION_FROM_STANDBY_TO_LEADER
      java.lang.Object offsetRecord
      Offset checkpoint info and DIV info
      int partitionId
      The partition which this state snapshot belongs to.
      long processedRecordSizeSinceLastSync
      How much bytes have been processed since last sync
      static org.apache.avro.Schema SCHEMA$  
    • Constructor Summary

      Constructors 
      Constructor Description
      ConsumptionStateSnapshot()
      Default constructor.
      ConsumptionStateSnapshot​(java.lang.Integer partitionId, java.lang.Boolean hybrid, java.lang.Boolean isIncrementalPushEnabled, java.lang.Object offsetRecord, java.lang.Boolean deferredWrite, java.lang.Boolean errorReported, java.lang.Boolean lagCaughtUp, java.lang.Boolean completionReported, java.lang.CharSequence leaderState, java.lang.Boolean isLatchReleased, java.lang.Long processedRecordSizeSinceLastSync, java.lang.Boolean consumeRemotely, java.lang.Long latestMessageConsumptionTimestampInMs)
      All-args constructor.
    • Field Detail

      • SCHEMA$

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

        public int partitionId
        The partition which this state snapshot belongs to.
      • hybrid

        public boolean hybrid
        Whether the store is hybrid.
      • isIncrementalPushEnabled

        public boolean isIncrementalPushEnabled
        Whether the store is incremental push enabled.
      • offsetRecord

        public java.lang.Object offsetRecord
        Offset checkpoint info and DIV info
      • deferredWrite

        public boolean deferredWrite
        Whether deferred write mode is enabled currently
      • errorReported

        public boolean errorReported
        Whether error has already been reported
      • lagCaughtUp

        public boolean lagCaughtUp
        Whether lag has ever caught up; it doesn't always indicate the current lag status
      • completionReported

        public boolean completionReported
        Whether completion has been reported before
      • leaderState

        public java.lang.CharSequence leaderState
        STANDBY; LEADER; IN_TRANSITION_FROM_STANDBY_TO_LEADER; PAUSE_TRANSITION_FROM_STANDBY_TO_LEADER
      • isLatchReleased

        public boolean isLatchReleased
        Whether transition latch is released
      • processedRecordSizeSinceLastSync

        public long processedRecordSizeSinceLastSync
        How much bytes have been processed since last sync
      • consumeRemotely

        public boolean consumeRemotely
        Whether the node is consuming remotely for this partition
      • latestMessageConsumptionTimestampInMs

        public long latestMessageConsumptionTimestampInMs
        the last time when the node consumes any message for this partition
    • Constructor Detail

      • 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 use newBuilder().
      • ConsumptionStateSnapshot

        public ConsumptionStateSnapshot​(java.lang.Integer partitionId,
                                        java.lang.Boolean hybrid,
                                        java.lang.Boolean isIncrementalPushEnabled,
                                        java.lang.Object offsetRecord,
                                        java.lang.Boolean deferredWrite,
                                        java.lang.Boolean errorReported,
                                        java.lang.Boolean lagCaughtUp,
                                        java.lang.Boolean completionReported,
                                        java.lang.CharSequence leaderState,
                                        java.lang.Boolean isLatchReleased,
                                        java.lang.Long processedRecordSizeSinceLastSync,
                                        java.lang.Boolean consumeRemotely,
                                        java.lang.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 info
        deferredWrite - Whether deferred write mode is enabled currently
        errorReported - Whether error has already been reported
        lagCaughtUp - Whether lag has ever caught up; it doesn't always indicate the current lag status
        completionReported - Whether completion has been reported before
        leaderState - STANDBY; LEADER; IN_TRANSITION_FROM_STANDBY_TO_LEADER; PAUSE_TRANSITION_FROM_STANDBY_TO_LEADER
        isLatchReleased - Whether transition latch is released
        processedRecordSizeSinceLastSync - How much bytes have been processed since last sync
        consumeRemotely - Whether the node is consuming remotely for this partition
        latestMessageConsumptionTimestampInMs - the last time when the node consumes any message for this partition
    • Method Detail

      • 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 java.lang.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$,
                        java.lang.Object value$)
        Specified by:
        put in interface org.apache.avro.generic.IndexedRecord
        Specified by:
        put in class org.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

        public java.lang.Object getOffsetRecord()
        Gets the value of the 'offsetRecord' field.
        Returns:
        Offset checkpoint info and DIV info
      • setOffsetRecord

        public void setOffsetRecord​(java.lang.Object value)
        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

        public java.lang.CharSequence getLeaderState()
        Gets the value of the 'leaderState' field.
        Returns:
        STANDBY; LEADER; IN_TRANSITION_FROM_STANDBY_TO_LEADER; PAUSE_TRANSITION_FROM_STANDBY_TO_LEADER
      • setLeaderState

        public void setLeaderState​(java.lang.CharSequence value)
        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

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

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