/** * Shorthand for {@link #merge} with just one element, to place it into the context of a window. * * <p>For example, the {@link #END_OF_WINDOW} policy moves the timestamp to the end of the window. */ public final Instant assign(BoundedWindow intoWindow, Instant timestamp) { return merge(intoWindow, Collections.singleton(timestamp)); }
/** Varargs variant of {@link #merge}. */ public final Instant merge(BoundedWindow intoWindow, Instant... timestamps) { return merge(intoWindow, Arrays.asList(timestamps)); }
Instant mergedTimestamp = timestampCombiner.merge(currentWindow, windowTimestamps); Instant mergedTimestamp = timestampCombiner.merge(currentWindow, windowTimestamps); Iterable<AccumT> accumsToMerge = Iterables.unmodifiableIterable(currentWindowAccumulators); WindowedValue<Iterable<AccumT>> preMergeWindowedValue =
Instant mergedTimestamp = timestampCombiner.merge(currentWindow, windowTimestamps); Instant mergedTimestamp = timestampCombiner.merge(currentWindow, windowTimestamps); Iterable<AccumT> accumsToMerge = Iterables.unmodifiableIterable(currentWindowAccumulators); WindowedValue<KV<K, Iterable<AccumT>>> preMergeWindowedValue =
} else { mergedHold = result.getTimestampCombiner().merge(context.window(), mergedHold, sourceOutputTime);
combineFn.addInput(accumulator, nextValue.getValue(), ctxtForInput(nextValue)); windowTimestamp = timestampCombiner.merge( currentWindow, windowTimestamp,