Google Cloud Dataflow SDK for Java, version 1.9.1
Interface DataflowAssert.SingletonAssert<T>
-
- Enclosing class:
- DataflowAssert
public static interface DataflowAssert.SingletonAssert<T>
Builder interface for assertions applicable to a single value.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method and Description Coder<T>
getCoder()
Deprecated.instead callPCollection.getCoder()
on the actualPCollection
directlyDataflowAssert.SingletonAssert<T>
inFinalPane(BoundedWindow window)
Creates a newDataflowAssert.SingletonAssert
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.SingletonAssert<T>
inOnlyPane(BoundedWindow window)
Creates a newDataflowAssert.SingletonAssert
like this one, but with the assertion restricted to only run on the provided window.DataflowAssert.SingletonAssert<T>
inOnTimePane(BoundedWindow window)
Creates a newDataflowAssert.SingletonAssert
like this one, but with the assertion restricted to only run on the provided window, running the checker only on the on-time pane for each key.DataflowAssert.SingletonAssert<T>
is(T expected)
Deprecated.instead useisEqualTo(Object)
DataflowAssert.SingletonAssert<T>
isEqualTo(T expected)
Asserts that the value in question is equal to the provided value, according toObject.equals(java.lang.Object)
.DataflowAssert.SingletonAssert<T>
notEqualTo(T notExpected)
Asserts that the value in question is not equal to the provided value, according toObject.equals(java.lang.Object)
.DataflowAssert.SingletonAssert<T>
satisfies(SerializableFunction<T,Void> checkerFn)
Applies the provided checking function (presumably containing assertions) to the value in question.DataflowAssert.SingletonAssert<T>
setCoder(Coder<T> coderOrNull)
Deprecated.instead callPCollection.setCoder(Coder)
on the actualPCollection
directly.
-
-
-
Method Detail
-
setCoder
@Deprecated DataflowAssert.SingletonAssert<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
.
-
inOnlyPane
DataflowAssert.SingletonAssert<T> inOnlyPane(BoundedWindow window)
Creates a newDataflowAssert.SingletonAssert
like this one, but with the assertion restricted to only run on the provided window.The assertion will expect outputs to be produced to the provided window exactly once. If the upstream
Trigger
may produce output multiple times, consider instead usinginFinalPane(BoundedWindow)
orinOnTimePane(BoundedWindow)
.- Returns:
- a new
DataflowAssert.SingletonAssert
like this one but with the assertion only applied to the specified window.
-
inFinalPane
DataflowAssert.SingletonAssert<T> inFinalPane(BoundedWindow window)
Creates a newDataflowAssert.SingletonAssert
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.SingletonAssert
like this one but with the assertion only applied to the specified window.
-
inOnTimePane
DataflowAssert.SingletonAssert<T> inOnTimePane(BoundedWindow window)
Creates a newDataflowAssert.SingletonAssert
like this one, but with the assertion restricted to only run on the provided window, running the checker only on the on-time pane for each key.- Returns:
- a new
DataflowAssert.SingletonAssert
like this one but with the assertion only applied to the specified window.
-
isEqualTo
DataflowAssert.SingletonAssert<T> isEqualTo(T expected)
Asserts that the value in question is equal to the provided value, according toObject.equals(java.lang.Object)
.- Returns:
- the same
DataflowAssert.SingletonAssert
builder for further assertions
-
is
@Deprecated DataflowAssert.SingletonAssert<T> is(T expected)
Deprecated. instead useisEqualTo(Object)
Asserts that the value in question is equal to the provided value, according toObject.equals(java.lang.Object)
.- Returns:
- the same
DataflowAssert.SingletonAssert
builder for further assertions
-
notEqualTo
DataflowAssert.SingletonAssert<T> notEqualTo(T notExpected)
Asserts that the value in question is not equal to the provided value, according toObject.equals(java.lang.Object)
.- Returns:
- the same
DataflowAssert.SingletonAssert
builder for further assertions
-
satisfies
DataflowAssert.SingletonAssert<T> satisfies(SerializableFunction<T,Void> checkerFn)
Applies the provided checking function (presumably containing assertions) to the value in question.- Returns:
- the same
DataflowAssert.SingletonAssert
builder for further assertions
-
-