Class StageMetricsSnapshot

java.lang.Object
com.linkedin.venice.jobs.StageMetricsSnapshot

public class StageMetricsSnapshot extends Object
Immutable, engine-agnostic snapshot of stage metrics captured after a VPJ job completes. Use StageMetricsRegistry.snapshot() to create an instance after dataFrame.count() triggers execution.
  • Constructor Details

  • Method Details

    • getStage

      public StageMetricsSnapshot.StageSummary getStage(String stageName)
      Get the summary for a specific stage, or null if not registered.
    • getFormattedReport

      public String getFormattedReport()
      Get the formatted diagnostic report. Generated lazily on first call.

      Example output:

       Stage                  Records In   Bytes In   Records Out  Bytes Out  Task Time
       ─────────────────────  ──────────   ────────   ───────────  ─────────  ────────
       ttl_filter             1,234,567    456.0 MB   1,222,222    451.0 MB      5.1s
       compaction             1,222,222    451.0 MB   1,100,000    410.0 MB         —
       

      Task Time semantics: For mapPartitions stages (ttl_filter, compression_reencode, kafka_write), this is wall-clock time per partition summed across partitions. For flatMapGroups stages (compaction, chunk_assembly), this is per-group elapsed time summed across all groups. Both represent total task time, not wall-clock duration.

    • toString

      public String toString()
      Overrides:
      toString in class Object