Google Cloud Dataflow SDK for Java, version 1.9.1
Interface DataflowAssert.IterableAssert<T>
-
- Enclosing class:
- DataflowAssert
public static interface DataflowAssert.IterableAssert<T>
Builder interface for assertions applicable to iterables and PCollection contents.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method and Description DataflowAssert.IterableAssert<T>
containsInAnyOrder(Iterable<T> expectedElements)
Asserts that the iterable in question contains the provided elements.DataflowAssert.IterableAssert<T>
containsInAnyOrder(T... expectedElements)
Asserts that the iterable in question contains the provided elements.DataflowAssert.IterableAssert<T>
empty()
Asserts that the iterable in question is empty.Coder<T>
getCoder()
Deprecated.instead callPCollection.getCoder()
on the actualPCollection
directlyDataflowAssert.IterableAssert<T>
inCombinedNonLatePanes(BoundedWindow window)
Creates a newDataflowAssert.IterableAssert
like this one, but with the assertion restricted to only run on the provided window across all panes that were not produced by the arrival of late data.DataflowAssert.IterableAssert<T>
inEarlyGlobalWindowPanes()
Creates a newDataflowAssert.IterableAssert
like this one, but with the assertion restricted to only run on panes in theGlobalWindow
that were emitted before theGlobalWindow
closed.DataflowAssert.IterableAssert<T>
inFinalPane(BoundedWindow window)
Creates a newDataflowAssert.IterableAssert
like this one, but with the assertion restricted to only run on the provided window, running the checker only on the final pane for each key.DataflowAssert.IterableAssert<T>
inOnTimePane(BoundedWindow window)
Creates a newDataflowAssert.IterableAssert
like this one, but with the assertion restricted to only run on the provided window.DataflowAssert.IterableAssert<T>
inWindow(BoundedWindow window)
Creates a newDataflowAssert.IterableAssert
like this one, but with the assertion restricted to only run on the provided window.DataflowAssert.IterableAssert<T>
satisfies(SerializableFunction<Iterable<T>,Void> checkerFn)
Applies the provided checking function (presumably containing assertions) to the iterable in question.DataflowAssert.IterableAssert<T>
setCoder(Coder<T> coderOrNull)
Deprecated.instead callPCollection.setCoder(Coder)
on the actualPCollection
directly.
-
-
-
Method Detail
-
setCoder
@Deprecated DataflowAssert.IterableAssert<T> setCoder(Coder<T> coderOrNull)
Deprecated. instead callPCollection.setCoder(Coder)
on the actualPCollection
directly.Sets the coder of the actualPCollection
.- Returns:
- the same
DataflowAssert.IterableAssert
builder for further assertions
-
getCoder
@Deprecated Coder<T> getCoder()
Deprecated. instead callPCollection.getCoder()
on the actualPCollection
directlyReturns the coder of the actualPCollection
.
-
inWindow
DataflowAssert.IterableAssert<T> inWindow(BoundedWindow window)
Creates a newDataflowAssert.IterableAssert
like this one, but with the assertion restricted to only run on the provided window.The assertion will concatenate all panes present in the provided window if the
Trigger
produces multiple panes. If the windowing strategy accumulates fired panes and triggers fire multple times, consider using insteadinFinalPane(BoundedWindow)
orinOnTimePane(BoundedWindow)
.- Returns:
- a new
DataflowAssert.IterableAssert
like this one but with the assertion only applied to the specified window.
-
inFinalPane
DataflowAssert.IterableAssert<T> inFinalPane(BoundedWindow window)
Creates a newDataflowAssert.IterableAssert
like this one, but with the assertion restricted to only run on the provided window, running the checker only on the final pane for each key.If the input
WindowingStrategy
does not always produce final panes, the assertion may be executed over an empty input even if the trigger has fired previously. To ensure that a final pane is always produced, set theClosingBehavior
of the windowing strategy (viaWindow.Bound#withAllowedLateness(Duration, ClosingBehavior)
settingClosingBehavior
toClosingBehavior#FIRE_ALWAYS
).- Returns:
- a new
DataflowAssert.IterableAssert
like this one but with the assertion only applied to the specified window.
-
inOnTimePane
DataflowAssert.IterableAssert<T> inOnTimePane(BoundedWindow window)
Creates a newDataflowAssert.IterableAssert
like this one, but with the assertion restricted to only run on the provided window.- Returns:
- a new
DataflowAssert.IterableAssert
like this one but with the assertion only applied to the specified window.
-
inCombinedNonLatePanes
DataflowAssert.IterableAssert<T> inCombinedNonLatePanes(BoundedWindow window)
Creates a newDataflowAssert.IterableAssert
like this one, but with the assertion restricted to only run on the provided window across all panes that were not produced by the arrival of late data.- Returns:
- a new
DataflowAssert.IterableAssert
like this one but with the assertion only applied to the specified window.
-
inEarlyGlobalWindowPanes
DataflowAssert.IterableAssert<T> inEarlyGlobalWindowPanes()
Creates a newDataflowAssert.IterableAssert
like this one, but with the assertion restricted to only run on panes in theGlobalWindow
that were emitted before theGlobalWindow
closed. These panes haveTiming#EARLY
.
-
containsInAnyOrder
DataflowAssert.IterableAssert<T> containsInAnyOrder(T... expectedElements)
Asserts that the iterable in question contains the provided elements.- Returns:
- the same
DataflowAssert.IterableAssert
builder for further assertions
-
containsInAnyOrder
DataflowAssert.IterableAssert<T> containsInAnyOrder(Iterable<T> expectedElements)
Asserts that the iterable in question contains the provided elements.- Returns:
- the same
DataflowAssert.IterableAssert
builder for further assertions
-
empty
DataflowAssert.IterableAssert<T> empty()
Asserts that the iterable in question is empty.- Returns:
- the same
DataflowAssert.IterableAssert
builder for further assertions
-
satisfies
DataflowAssert.IterableAssert<T> satisfies(SerializableFunction<Iterable<T>,Void> checkerFn)
Applies the provided checking function (presumably containing assertions) to the iterable in question.- Returns:
- the same
DataflowAssert.IterableAssert
builder for further assertions
-
-