Interface RestrictionTracker.HasProgress

    • Method Detail

      • getProgress

        RestrictionTracker.Progress getProgress()
        A representation for the amount of known completed and known remaining work.

        It is up to each restriction tracker to convert between their natural representation of completed and remaining work and the double representation. For example:

        • Block based file source (e.g. Avro): The number of bytes from the beginning of the restriction to the current block and the number of bytes from the current block to the end of the restriction.
        • Pull based queue based source (e.g. Pubsub): The local/global size available in number of messages or number of message bytes that have processed and the number of messages or number of message bytes that are outstanding.
        • Key range based source (e.g. BigQuery, Bigtable, ...): Scale the start key to be one and end key to be zero and interpolate the position of the next splittable key as a position. If information about the probability density function or cumulative distribution function is available, work completed and work remaining interpolation can be improved. Alternatively, if the number of encoded bytes for the keys and values is known for the key range, the number of completed and remaining bytes can be used.

        The work completed and work remaining must be of the same scale whether that be number of messages or number of bytes and should never represent two distinct unit types.