T
- The type of the elements in this stream.@PublicEvolving public class CachedDataStream<T> extends DataStream<T>
CachedDataStream
represents a DataStream
whose intermediate result will be cached
at the first time when it is computed. And the cached intermediate result can be used in later
job that using the same CachedDataStream
to avoid re-computing the intermediate result.DataStream.Collector<T>
environment, transformation
Constructor and Description |
---|
CachedDataStream(StreamExecutionEnvironment environment,
Transformation<T> transformation)
Create a new
CachedDataStream in the given execution environment that wrap the given
physical transformation to indicates that the transformation should be cached. |
Modifier and Type | Method and Description |
---|---|
void |
invalidate()
Invalidate the cache intermediate result of this DataStream to release the physical
resources.
|
addSink, assignTimestampsAndWatermarks, assignTimestampsAndWatermarks, assignTimestampsAndWatermarks, broadcast, broadcast, clean, coGroup, collectAsync, collectAsync, connect, connect, countWindowAll, countWindowAll, doTransform, executeAndCollect, executeAndCollect, executeAndCollect, executeAndCollect, filter, flatMap, flatMap, forward, fullWindowPartition, getExecutionConfig, getExecutionEnvironment, getId, getMinResources, getParallelism, getPreferredResources, getTransformation, getType, global, iterate, iterate, join, keyBy, keyBy, keyBy, keyBy, map, map, partitionCustom, partitionCustom, partitionCustom, print, print, printToErr, printToErr, process, process, project, rebalance, rescale, setConnectionType, shuffle, sinkTo, sinkTo, sinkTo, sinkTo, timeWindowAll, timeWindowAll, transform, transform, union, windowAll, writeAsCsv, writeAsCsv, writeAsCsv, writeAsText, writeAsText, writeToSocket, writeUsingOutputFormat
public CachedDataStream(StreamExecutionEnvironment environment, Transformation<T> transformation)
CachedDataStream
in the given execution environment that wrap the given
physical transformation to indicates that the transformation should be cached.environment
- The StreamExecutionEnvironmenttransformation
- The physical transformation whose intermediate result should be cached.public void invalidate() throws Exception
Exception
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.