flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl0u <...@git.apache.org>
Subject [GitHub] flink pull request #4143: [FLINK-6418][cep] Support for dynamic state change...
Date Fri, 23 Jun 2017 10:08:56 GMT
Github user kl0u commented on a diff in the pull request:

    --- Diff: flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/pattern/Pattern.java
    @@ -186,6 +193,24 @@ public Quantifier getQuantifier() {
    +	 * Applies a stop condition for a looping state. It allows cleaning the underlying state.
    +	 *
    +	 * @param untilCondition a condition an event has to satisfy to stop collecting events
into looping state
    +	 * @return The same pattern with applied untilCondition
    +	 */
    +	public Pattern<T, F> until(IterativeCondition<F> untilCondition) {
    +		Preconditions.checkNotNull(untilCondition, "The condition cannot be null");
    +		if (!quantifier.hasProperty(Quantifier.QuantifierProperty.LOOPING)) {
    +			throw new MalformedPatternException("The until condition is only applicable to looping
    +		}
    --- End diff --
    Check also if there is another `until` condition already specified and throw an exception
saying that a condition has already been specified for the pattern.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message