@Internal public interface SlicingWindowProcessor<W> extends Serializable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
SlicingWindowProcessor.Context<W>
Information available in an invocation of methods of
SlicingWindowProcessor. |
| Modifier and Type | Method and Description |
|---|---|
void |
advanceProgress(long progress)
Advances the progress time, the progress time is watermark if working in event-time mode, or
current processing time if working in processing-time mode.
|
void |
clearWindow(W window)
Clear state and resources associated with the given window namespace.
|
void |
close()
The tear-down method of the function.
|
org.apache.flink.api.common.typeutils.TypeSerializer<W> |
createWindowSerializer()
Returns the serializer of the window type.
|
void |
fireWindow(W window)
Emit results of the given window.
|
void |
open(SlicingWindowProcessor.Context<W> context)
Initialization method for the function.
|
void |
prepareCheckpoint()
Performs a preparation before checkpoint.
|
boolean |
processElement(org.apache.flink.table.data.RowData key,
org.apache.flink.table.data.RowData element)
Process an element with associated key from the input stream.
|
void open(SlicingWindowProcessor.Context<W> context) throws Exception
Exceptionboolean processElement(org.apache.flink.table.data.RowData key,
org.apache.flink.table.data.RowData element)
throws Exception
key - the key associated with the elementelement - The element to process.Exceptionvoid advanceProgress(long progress)
throws Exception
This will potentially flush buffered data into states, because the watermark advancement may be in a very small step, but we don't need to flush buffered data for every watermark advancement.
progress - the current progress timeExceptionvoid prepareCheckpoint()
throws Exception
Exceptionvoid fireWindow(W window) throws Exception
Note: the key context has been set.
window - the window to emitExceptionvoid clearWindow(W window) throws Exception
Note: the key context has been set.
window - the window to clearExceptionvoid close()
throws Exception
Exceptionorg.apache.flink.api.common.typeutils.TypeSerializer<W> createWindowSerializer()
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.