public abstract class AbstractTester extends java.lang.Object implements Tester
Constructor and Description |
---|
AbstractTester() |
Modifier and Type | Method and Description |
---|---|
Condition<java.lang.Boolean> |
and(Condition<?>... conditions)
Return a condition that is valid only if all of
conditions are valid. |
boolean |
complete(Submitter<Topology,? extends Job> submitter,
com.google.gson.JsonObject config,
Condition<?> endCondition,
long timeout,
java.util.concurrent.TimeUnit unit)
Submit the topology for this tester and wait for it to complete, or reach
an end condition.
|
Job |
getJob()
Get the
Job reference for the topology submitted by complete() . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
atLeastTupleCount, contentsUnordered, streamContents, tupleCount
topology
public boolean complete(Submitter<Topology,? extends Job> submitter, com.google.gson.JsonObject config, Condition<?> endCondition, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.Exception
Tester
timeout
then it is terminated.
End condition is usually a Condition
returned from
Tester.atLeastTupleCount(TStream, long)
or
Tester.tupleCount(TStream, long)
so that this method returns once the
stream has submitted a sufficient number of tuples.
Note that the condition will be only checked periodically up to
timeout
, so that if the condition is only valid for a brief
period of time, then its valid state may not be seen, and thus this
method will wait for the timeout period.
complete
in interface Tester
submitter
- the Submitter
config
- submission configuration.endCondition
- Condition that will cause this method to return if it is true.timeout
- Maximum time to wait for the topology to complete or reach its
end condition.unit
- Unit for timeout
.endCondition.valid()
.java.lang.Exception
- Failure submitting or executing the topology.public Job getJob()
Tester
Job
reference for the topology submitted by complete()
.public Condition<java.lang.Boolean> and(Condition<?>... conditions)
Tester
conditions
are valid.
The result of the condition is Condition.valid()
Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641