drain
fun drain(partitionKeys: List<PartitionKey>): Map<DestinationStream.Descriptor, AdditionalStatsHistogram>
Drains the accumulated statistics for the specified destination stream across the provided partition keys, returning a combined histogram of all relevant metrics. For any metric values not present, default values are added. This is to ensure that the metrics are always published as part of the state message with a zero value if no value has been recorded since the last state message publish event.
Return
A Histogram containing the combined metrics for the specified destination stream.
Parameters
partitionKeys
The list of partition keys to process, each representing a distinct partition.
stream
The descriptor of the destination stream whose statistics are to be drained.