Package com.linkedin.davinci.stats
Class IngestionStatsUtils
java.lang.Object
com.linkedin.davinci.stats.IngestionStatsUtils
Utility methods for computing ingestion statistics from a
StoreIngestionTask.
These methods are shared between IngestionStats (Tehuti) and
com.linkedin.davinci.stats.ingestion.IngestionOtelStats (OpenTelemetry).-
Method Summary
Modifier and TypeMethodDescriptionstatic intGets the ingestion task error count.static doubleGets the storage quota usage from the ingestion task.static intGets the write compute error code from the ingestion task.static booleanChecks if the given task is active (non-null and running).
-
Method Details
-
hasActiveIngestionTask
Checks if the given task is active (non-null and running).- Parameters:
task- The ingestion task to check- Returns:
- true if the task is non-null and running, false otherwise
-
getIngestionTaskErroredGauge
Gets the ingestion task error count. To prevent this metric being too noisy and align with the PreNotificationCheck of reportError, this metric should only return non-zero if the ingestion task errored after EOP is received for any of the partitions.- Parameters:
task- The ingestion task to get error count from- Returns:
- The number of failed partitions if any partition has completed, 0 otherwise
-
getWriteComputeErrorCode
Gets the write compute error code from the ingestion task.- Parameters:
task- The ingestion task to get error code from- Returns:
- The write compute error code, or INACTIVE_STORE_INGESTION_TASK code if task is inactive
-
getStorageQuotaUsed
Gets the storage quota usage from the ingestion task.- Parameters:
task- The ingestion task to get quota usage from- Returns:
- The disk quota usage as a ratio (0.0-1.0), or 0 if unavailable
-