Interface ThroughputEstimator<T>

All Superinterfaces:
Serializable
All Known Implementing Classes:
BytesThroughputEstimator, NullThroughputEstimator

public interface ThroughputEstimator<T> extends Serializable
An estimator to calculate the throughput of the outputted elements from a DoFn.
  • Method Summary

    Modifier and Type
    Method
    Description
    default double
    get()
    Returns the estimated throughput for now.
    double
    getFrom(com.google.cloud.Timestamp time)
    Returns the estimated throughput for a specified time.
    void
    update(com.google.cloud.Timestamp timeOfRecords, T element)
    Updates the estimator with the size of the records.
  • Method Details

    • update

      void update(com.google.cloud.Timestamp timeOfRecords, T element)
      Updates the estimator with the size of the records.
      Parameters:
      timeOfRecords - the committed timestamp of the records
      element - the element to estimate the byte size of
    • get

      default double get()
      Returns the estimated throughput for now.
    • getFrom

      double getFrom(com.google.cloud.Timestamp time)
      Returns the estimated throughput for a specified time.
      Parameters:
      time - the specified timestamp to check throughput