Interface ThroughputEstimator<T>

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    BytesThroughputEstimator, NullThroughputEstimator

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

      All Methods Instance Methods Abstract Methods Default Methods 
      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 Detail

      • 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