Skip to content

Commit

Permalink
fixup!
Browse files Browse the repository at this point in the history
Update callAfterOutputMustHaveBennProduced documentation
  • Loading branch information
tgroh committed Mar 8, 2016
1 parent b9b817c commit bdbd70b
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,19 +269,20 @@ public void add(Iterable<WindowedValue<ElemT>> values) {
}

/**
* Schedules a callback after the watermark for a {@link PValue} after the trigger for the
* specified window (with the specified windowing strategy) must have fired from the perspective
* of that {@link PValue}, as specified by the value of
* Execute the specified callback after the watermark for a {@link PValue} passes the point at
* which the trigger for the specified window (with the specified windowing strategy) must have
* fired from the perspective of that {@link PValue}, as specified by the value of
* {@link Trigger#getWatermarkThatGuaranteesFiring(BoundedWindow)} for the trigger of the
* {@link WindowingStrategy}.
* {@link WindowingStrategy}. When the callback has fired, either values will have been produced
* for a key in that window, or the window is empty.
*/
public void callAfterOutputMustHaveBeenProduced(
PValue value,
BoundedWindow window,
WindowingStrategy<?, ?> windowingStrategy,
Runnable runnable) {
WatermarkCallback callback =
WatermarkCallback.onWindowClose(window, windowingStrategy, runnable);
WatermarkCallback.onGuaranteedFiring(window, windowingStrategy, runnable);
AppliedPTransform<?, ?, ?> producing = getProducing(value);
PriorityQueue<WatermarkCallback> callbacks = pendingCallbacks.get(producing);
if (callbacks == null) {
Expand Down Expand Up @@ -377,7 +378,7 @@ public CounterSet getCounters() {
}

private static class WatermarkCallback {
public static <W extends BoundedWindow> WatermarkCallback onWindowClose(
public static <W extends BoundedWindow> WatermarkCallback onGuaranteedFiring(
BoundedWindow window, WindowingStrategy<?, W> strategy, Runnable callback) {
@SuppressWarnings("unchecked")
Instant firingAfter =
Expand Down

0 comments on commit bdbd70b

Please sign in to comment.