T- The type of the elements in this stream.
@PublicEvolving public class CachedDataStream<T> extends DataStream<T>
DataStreamwhose 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
CachedDataStreamto avoid re-computing the intermediate result.
|Constructor and Description|
Create a new
|Modifier and Type||Method and Description|
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, 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)
CachedDataStreamin the given execution environment that wrap the given physical transformation to indicates that the transformation should be cached.
environment- The StreamExecutionEnvironment
transformation- The physical transformation whose intermediate result should be cached.
public void invalidate() throws Exception
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.