THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
We introduce the cache method to the SingleOutputStreamOperator
class. In order to allow caching the side output of the SingleOutputStreamOperator
, we let the getSideOutput
method returns a SingleOutputStreamOperator
.
Code Block | ||
---|---|---|
| ||
public class SingleOutputStreamOperator<T> extends DataStream<T> {
...
/**
* Cache the intermediate result of the transformation. Only job running in batch mode with
* blocking shuffle mode can create cache. Otherwise, an exception will be thrown. The cache
* is generated lazily at the first time the intermediate result is computed. The cache will
* be clear when {@link CachedDataStream#invalidateCache()} called or the
* {@link StreamExecutionEnvironment} close.
*
* @return CachedDataStream that can use in later job to reuse the cached intermediate
* result.
*/
public CachedDataStream cache() {
...
}
public <X> SingleOutputStreamOperator<X> getSideOutput(OutputTag<X> sideOutputTag) {
...
}
} |
We introduce CacheDataStream
that extends the DataStream
and implements the AutoCloseable
interface.
...