/** * Returns an event time policy that results in no timestamping. Only * useful in jobs with streaming sources that don't do any aggregation. * If there is an aggregation step in the job and you use these parameters, * your job will keep accumulating the data without producing any output. */ public static <T> EventTimePolicy<T> noEventTime() { return eventTimePolicy(i -> Long.MIN_VALUE, noWrapping(), NO_WATERMARKS, 0, 0, -1); }
/** * Creates and returns a new event time policy. To get a policy that * results in no watermarks being emitted, call {@link * #noEventTime()}. * * @param timestampFn function that extracts the timestamp from the event; * if null, Jet will use the source's native timestamp * @param newWmPolicyFn factory of the watermark policy objects * @param watermarkThrottlingFrameSize the frame length to which we * throttle watermarks, see {@link #watermarkThrottlingFrameSize()} * @param watermarkThrottlingFrameOffset the frame offset to which we * throttle watermarks, see {@link #watermarkThrottlingFrameOffset()} * @param idleTimeoutMillis the timeout after which a partition will be * marked as <em>idle</em>. */ public static <T> EventTimePolicy<T> eventTimePolicy( @Nullable DistributedToLongFunction<? super T> timestampFn, @Nonnull DistributedSupplier<? extends WatermarkPolicy> newWmPolicyFn, long watermarkThrottlingFrameSize, long watermarkThrottlingFrameOffset, long idleTimeoutMillis ) { return eventTimePolicy(timestampFn, noWrapping(), newWmPolicyFn, watermarkThrottlingFrameSize, watermarkThrottlingFrameOffset, idleTimeoutMillis); }