Search in sources :

Example 1 with PeekTransform

use of com.hazelcast.jet.impl.pipeline.transform.PeekTransform in project hazelcast by hazelcast.

the class ComputeStageImplBase method attachPeek.

@Nonnull
@SuppressWarnings({ "unchecked", "rawtypes" })
<RET> RET attachPeek(@Nonnull PredicateEx<? super T> shouldLogFn, @Nonnull FunctionEx<? super T, ? extends CharSequence> toStringFn) {
    checkSerializable(shouldLogFn, "shouldLogFn");
    checkSerializable(toStringFn, "toStringFn");
    if (isRebalanceOutput) {
        throw new JetException("peek() not supported after rebalance()");
    }
    return attach(new PeekTransform(transform, fnAdapter.adaptFilterFn(shouldLogFn), fnAdapter.adaptToStringFn(toStringFn)), fnAdapter);
}
Also used : PeekTransform(com.hazelcast.jet.impl.pipeline.transform.PeekTransform) JetException(com.hazelcast.jet.JetException) Nonnull(javax.annotation.Nonnull)

Aggregations

JetException (com.hazelcast.jet.JetException)1 PeekTransform (com.hazelcast.jet.impl.pipeline.transform.PeekTransform)1 Nonnull (javax.annotation.Nonnull)1