Package com.linkedin.davinci.stats
Class IngestionStats
java.lang.Object
com.linkedin.davinci.stats.IngestionStats
This class contains stats for store ingestion. The stat class is used in
VeniceVersionedStats to serve for
a single store version or total of all store versions.
This class does not contain reporting logic as reporting is done by the IngestionStatsReporter.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected static final Stringprotected static final StringConsumer metric: Measures the total time from when a record starts being processed (after polling from Kafka and schema checks) until it completes all processing stages.protected static final Stringprotected static final Stringstatic final Stringprotected static final Stringprotected static final Stringstatic final StringDrainer metric: Measures the time spent on lightweight preprocessing tasks before heavy message processing begins.protected static final Stringprotected static final Stringstatic final StringLeader metric: Measures the time from when keys are locked for a batch of records to just before producing to Kafka.static final StringLeader metric: Measures the time from when a produce call is made to when the producer callback is invoked, indicating how long Kafka took to write the message to the broker and invoke the callback.protected static final Stringprotected static final Stringstatic final StringFollower metric: Measures the latency from when the local broker (local region Kafka) received a message to when the follower consumer fetched it.static final StringLeader metric: Measures the latency from when a nearline producer originally produced a message (with its producer timestamp) to when that message is successfully written to the local broker's version topic by the leader.protected static final Stringstatic final StringLeader metric: Measures the time spent within the leader's producer callback processing after a message is successfully produced to the local broker.static final StringFollower metric: Measures the latency from when the leader produced a message to when the local broker (local region Kafka) received it.static final StringLeader metric: Measures the latency from when a producer created a message (producer timestamp) to when the source broker (remote region Kafka) received it.protected static final Stringstatic final StringLeader metric: Measures the latency from when the source broker (remote region Kafka) received a message to when the leader consumer fetched it.static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubledoubledoubledoubledoubledoubledoubledoubleintintdoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoublegetRegionHybridBytesConsumed(int regionId) doublegetRegionHybridRecordsConsumed(int regionId) doubleRetrieves the storage quota usage for the current ingestion task.doubledoubledoubledoubledoubledoubledoubleintvoidrecordBatchProcessingRequest(int size, long currentTimeMs) voidvoidrecordBatchProcessingRequestLatency(double latency, long currentTimeMs) voidrecordBytesConsumed(long value) voidrecordConsumedRecordEndToEndProcessingLatency(double value, long currentTimeMs) voidrecordFollowerBytesConsumed(long value) voidvoidrecordIdleTime(long value) voidrecordInternalPreprocessingLatency(double value, long currentTimeMs) voidrecordLeaderBytesConsumed(long value) voidrecordLeaderBytesProduced(long value) voidrecordLeaderPreprocessingLatency(double value, long currentTimeMs) voidrecordLeaderProducerCompletionLatencyMs(double value, long currentTimeMs) voidvoidrecordLeaderRecordsProduced(long value) voidrecordLocalBrokerFollowerConsumerLatencyMs(double value, long currentTimeMs) voidrecordNearlineProducerToLocalBrokerLatency(double value, long currentTimeMs) voidvoidrecordProducerCallBackLatency(double value, long currentTimeMs) voidrecordProducerLocalBrokerLatencyMs(double value, long currentTimeMs) voidrecordProducerSourceBrokerLatencyMs(double value, long currentTimeMs) voidvoidrecordRegionHybridBytesConsumed(int regionId, double value, long currentTimeMs) voidrecordRegionHybridRecordsConsumed(int regionId, double value, long currentTimeMs) voidrecordSourceBrokerLeaderConsumerLatencyMs(double value, long currentTimeMs) voidrecordSubscribePrepLatency(double value, long currentTimeMs) voidvoidvoidvoidvoidvoidsetIngestionTask(StoreIngestionTask ingestionTask) voidsetIngestionTaskPushTimeoutGauge(int value) static doubleunAvailableToZero(double value)
-
Field Details
-
INGESTION_TASK_ERROR_GAUGE
- See Also:
-
INGESTION_TASK_PUSH_TIMEOUT_GAUGE
- See Also:
-
WRITE_COMPUTE_OPERATION_FAILURE
- See Also:
-
RECORDS_CONSUMED_METRIC_NAME
- See Also:
-
BYTES_CONSUMED_METRIC_NAME
- See Also:
-
LEADER_RECORDS_CONSUMED_METRIC_NAME
- See Also:
-
LEADER_BYTES_CONSUMED_METRIC_NAME
- See Also:
-
FOLLOWER_RECORDS_CONSUMED_METRIC_NAME
- See Also:
-
FOLLOWER_BYTES_CONSUMED_METRIC_NAME
- See Also:
-
LEADER_RECORDS_PRODUCED_METRIC_NAME
- See Also:
-
LEADER_BYTES_PRODUCED_METRIC_NAME
- See Also:
-
SUBSCRIBE_ACTION_PREP_LATENCY
- See Also:
-
UPDATE_IGNORED_DCR
- See Also:
-
TOTAL_DCR
- See Also:
-
TOTAL_DUPLICATE_KEY_UPDATE_COUNT
- See Also:
-
TIMESTAMP_REGRESSION_DCR_ERROR
- See Also:
-
OFFSET_REGRESSION_DCR_ERROR
- See Also:
-
TOMBSTONE_CREATION_DCR
- See Also:
-
CONSUMED_RECORD_END_TO_END_PROCESSING_LATENCY
Consumer metric: Measures the total time from when a record starts being processed (after polling from Kafka and schema checks) until it completes all processing stages. This includes leader preprocessing, producing to local Kafka (for leaders), queueing to drainer, drainer processing (persisting to storage), and offset updates.- See Also:
-
NEARLINE_PRODUCER_TO_LOCAL_BROKER_LATENCY
Leader metric: Measures the latency from when a nearline producer originally produced a message (with its producer timestamp) to when that message is successfully written to the local broker's version topic by the leader.- See Also:
-
PRODUCER_TO_SOURCE_BROKER_LATENCY
Leader metric: Measures the latency from when a producer created a message (producer timestamp) to when the source broker (remote region Kafka) received it.- See Also:
-
SOURCE_BROKER_TO_LEADER_CONSUMER_LATENCY
Leader metric: Measures the latency from when the source broker (remote region Kafka) received a message to when the leader consumer fetched it.- See Also:
-
PRODUCER_TO_LOCAL_BROKER_LATENCY
Follower metric: Measures the latency from when the leader produced a message to when the local broker (local region Kafka) received it.- See Also:
-
LOCAL_BROKER_TO_FOLLOWER_CONSUMER_LATENCY
Follower metric: Measures the latency from when the local broker (local region Kafka) received a message to when the follower consumer fetched it.- See Also:
-
LEADER_PRODUCER_COMPLETION_LATENCY
Leader metric: Measures the time from when a produce call is made to when the producer callback is invoked, indicating how long Kafka took to write the message to the broker and invoke the callback.- See Also:
-
IDLE_TIME
- See Also:
-
PRODUCER_CALLBACK_LATENCY
Leader metric: Measures the time spent within the leader's producer callback processing after a message is successfully produced to the local broker. This includes chunking processing, producing to drainer buffer service, producing deprecated chunk deletions, and recording stats.- See Also:
-
LEADER_PREPROCESSING_LATENCY
Leader metric: Measures the time from when keys are locked for a batch of records to just before producing to Kafka. When batch processing is enabled: includes batch processing (with partial update operations), record validation, and for real-time topics, recording hybrid consumption stats. When batch processing is disabled: includes only record validation and stats recording; partial update happens later.- See Also:
-
INTERNAL_PREPROCESSING_LATENCY
Drainer metric: Measures the time spent on lightweight preprocessing tasks before heavy message processing begins. This includes recording write path latency stats (producer-to-broker, broker-to-consumer), drainer message validation, and reporting batch end of incremental push status. Recorded at the start of internalProcessConsumerRecord, before control message or data message processing.- See Also:
-
BATCH_PROCESSING_REQUEST
- See Also:
-
BATCH_PROCESSING_REQUEST_SIZE
- See Also:
-
BATCH_PROCESSING_REQUEST_RECORDS
- See Also:
-
BATCH_PROCESSING_REQUEST_LATENCY
- See Also:
-
BATCH_PROCESSING_REQUEST_ERROR
- See Also:
-
STORAGE_QUOTA_USED
- See Also:
-
-
Constructor Details
-
IngestionStats
-
-
Method Details
-
getIngestionTask
-
setIngestionTask
-
getIngestionTaskErroredGauge
public int getIngestionTaskErroredGauge() -
getWriteComputeErrorCode
public int getWriteComputeErrorCode() -
getSubscribePrepLatencyAvg
public double getSubscribePrepLatencyAvg() -
getSubscribePrepLatencyMax
public double getSubscribePrepLatencyMax() -
recordSubscribePrepLatency
public void recordSubscribePrepLatency(double value, long currentTimeMs) -
getProducerCallBackLatencyMax
public double getProducerCallBackLatencyMax() -
recordProducerCallBackLatency
public void recordProducerCallBackLatency(double value, long currentTimeMs) -
getLeaderPreprocessingLatencyMax
public double getLeaderPreprocessingLatencyMax() -
getLeaderPreprocessingLatencyAvg
public double getLeaderPreprocessingLatencyAvg() -
recordLeaderPreprocessingLatency
public void recordLeaderPreprocessingLatency(double value, long currentTimeMs) -
getInternalPreprocessingLatencyAvg
public double getInternalPreprocessingLatencyAvg() -
getInternalPreprocessingLatencyMax
public double getInternalPreprocessingLatencyMax() -
recordInternalPreprocessingLatency
public void recordInternalPreprocessingLatency(double value, long currentTimeMs) -
getConsumedRecordEndToEndProcessingLatencyAvg
public double getConsumedRecordEndToEndProcessingLatencyAvg() -
getConsumedRecordEndToEndProcessingLatencyMax
public double getConsumedRecordEndToEndProcessingLatencyMax() -
recordConsumedRecordEndToEndProcessingLatency
public void recordConsumedRecordEndToEndProcessingLatency(double value, long currentTimeMs) -
getRecordsConsumed
public double getRecordsConsumed() -
recordRecordsConsumed
public void recordRecordsConsumed() -
getBytesConsumed
public double getBytesConsumed() -
recordBytesConsumed
public void recordBytesConsumed(long value) -
getLeaderRecordsConsumed
public double getLeaderRecordsConsumed() -
recordLeaderRecordsConsumed
public void recordLeaderRecordsConsumed() -
getLeaderBytesConsumed
public double getLeaderBytesConsumed() -
recordLeaderBytesConsumed
public void recordLeaderBytesConsumed(long value) -
getFollowerRecordsConsumed
public double getFollowerRecordsConsumed() -
recordFollowerRecordsConsumed
public void recordFollowerRecordsConsumed() -
getFollowerBytesConsumed
public double getFollowerBytesConsumed() -
recordFollowerBytesConsumed
public void recordFollowerBytesConsumed(long value) -
recordUpdateIgnoredDCR
public void recordUpdateIgnoredDCR() -
recordTotalDCR
public void recordTotalDCR() -
recordTotalDuplicateKeyUpdate
public void recordTotalDuplicateKeyUpdate() -
recordTimestampRegressionDCRError
public void recordTimestampRegressionDCRError() -
recordOffsetRegressionDCRError
public void recordOffsetRegressionDCRError() -
recordTombStoneCreationDCR
public void recordTombStoneCreationDCR() -
getRegionHybridBytesConsumed
public double getRegionHybridBytesConsumed(int regionId) -
recordRegionHybridBytesConsumed
public void recordRegionHybridBytesConsumed(int regionId, double value, long currentTimeMs) -
getRegionHybridRecordsConsumed
public double getRegionHybridRecordsConsumed(int regionId) -
recordRegionHybridRecordsConsumed
public void recordRegionHybridRecordsConsumed(int regionId, double value, long currentTimeMs) -
getLeaderRecordsProduced
public double getLeaderRecordsProduced() -
getUpdateIgnoredRate
public double getUpdateIgnoredRate() -
getTotalDCRRate
public double getTotalDCRRate() -
getTotalDuplicateKeyUpdateCount
public double getTotalDuplicateKeyUpdateCount() -
getTombstoneCreationDCRRate
public double getTombstoneCreationDCRRate() -
getTimestampRegressionDCRRate
public double getTimestampRegressionDCRRate() -
getOffsetRegressionDCRRate
public double getOffsetRegressionDCRRate() -
recordLeaderRecordsProduced
public void recordLeaderRecordsProduced(long value) -
getLeaderBytesProduced
public double getLeaderBytesProduced() -
recordLeaderBytesProduced
public void recordLeaderBytesProduced(long value) -
setIngestionTaskPushTimeoutGauge
public void setIngestionTaskPushTimeoutGauge(int value) -
getIngestionTaskPushTimeoutGauge
public int getIngestionTaskPushTimeoutGauge() -
getNearlineProducerToLocalBrokerLatencyAvg
public double getNearlineProducerToLocalBrokerLatencyAvg() -
getNearlineProducerToLocalBrokerLatencyMax
public double getNearlineProducerToLocalBrokerLatencyMax() -
recordNearlineProducerToLocalBrokerLatency
public void recordNearlineProducerToLocalBrokerLatency(double value, long currentTimeMs) -
recordIdleTime
public void recordIdleTime(long value) -
getIdleTime
public double getIdleTime() -
getProducerSourceBrokerLatencySensor
-
recordProducerSourceBrokerLatencyMs
public void recordProducerSourceBrokerLatencyMs(double value, long currentTimeMs) -
recordSourceBrokerLeaderConsumerLatencyMs
public void recordSourceBrokerLeaderConsumerLatencyMs(double value, long currentTimeMs) -
getSourceBrokerLeaderConsumerLatencySensor
-
recordProducerLocalBrokerLatencyMs
public void recordProducerLocalBrokerLatencyMs(double value, long currentTimeMs) -
getProducerLocalBrokerLatencySensor
-
recordLocalBrokerFollowerConsumerLatencyMs
public void recordLocalBrokerFollowerConsumerLatencyMs(double value, long currentTimeMs) -
getLocalBrokerFollowerConsumerLatencySensor
-
recordLeaderProducerCompletionLatencyMs
public void recordLeaderProducerCompletionLatencyMs(double value, long currentTimeMs) -
getLeaderProducerCompletionLatencySensor
-
recordBatchProcessingRequest
public void recordBatchProcessingRequest(int size, long currentTimeMs) -
getBatchProcessingRequest
public double getBatchProcessingRequest() -
getBatchProcessingRequestRecords
public double getBatchProcessingRequestRecords() -
recordBatchProcessingRequestError
public void recordBatchProcessingRequestError() -
getBatchProcessingRequestError
public double getBatchProcessingRequestError() -
getBatchProcessingRequestSizeSensor
-
recordBatchProcessingRequestLatency
public void recordBatchProcessingRequestLatency(double latency, long currentTimeMs) -
getBatchProcessingRequestLatencySensor
-
unAvailableToZero
public static double unAvailableToZero(double value) -
getStorageQuotaUsed
public double getStorageQuotaUsed()Retrieves the storage quota usage for the current ingestion task.- Returns:
- The disk quota usage as a double value, or 0 if unavailable.
-