Class PushJobDetailsAdditionalMetrics

java.lang.Object
com.linkedin.venice.status.protocol.PushJobDetailsAdditionalMetrics

public final class PushJobDetailsAdditionalMetrics extends Object
Keys and accessors for PushJobDetails.additionalPushMetrics, the open-ended map<string, long> the push job uses to report extra per-push measurements.

Both sides of the protocol go through here so the key strings exist exactly once: the push job writes them, the controller reads them. Two absence cases are distinguished and both mean "not reported" rather than zero:

  • a null map — the push reported no additional metrics at all, which is also what a v5 record resolves to when read by a v6 reader;
  • a present map with the key absent — the push reported some metrics but not this one.

Avro deserializes map keys as Utf8, not String, so a plain Map#get(Object) with a String key silently misses on a record that came off the wire. getMetric(com.linkedin.venice.status.protocol.PushJobDetails, java.lang.String) compares by CharSequence.toString() to work for both freshly built and deserialized records.

  • Field Details

    • EXTERNAL_STORAGE_WRITE_TIME_MS

      public static final String EXTERNAL_STORAGE_WRITE_TIME_MS
      Summed data-writer task wall-clock milliseconds spent in the external storage write path: throttling wait, batchPut calls including retries and retry backoff, external flush and external close.
      See Also:
    • VENICE_WRITE_TIME_MS

      public static final String VENICE_WRITE_TIME_MS
      Summed data-writer task wall-clock milliseconds spent invoking the Venice/Kafka writes and flushing and closing the Venice writer.
      See Also:
  • Method Details

    • getMetric

      public static Long getMetric(PushJobDetails pushJobDetails, String key)
      Read one metric.
      Returns:
      the reported value, or null when the map is null or does not carry key. A null return means "not reported" and must not be recorded as a zero observation.
    • putMetric

      public static void putMetric(PushJobDetails pushJobDetails, String key, long value)
      Record one metric, lazily creating the map so a push that reports nothing leaves it null rather than serializing an empty map.