Class CacheTransformation<T>

java.lang.Object
org.apache.flink.api.dag.Transformation<T>
org.apache.flink.streaming.api.transformations.CacheTransformation<T>
Type Parameters:
T - The type of the elements in the cache intermediate result.

@Internal public class CacheTransformation<T> extends org.apache.flink.api.dag.Transformation<T>
When in batch mode, the CacheTransformation represents the intermediate result of the upper stream should be cached when it is computed at the first time. And it consumes the cached intermediate result in later jobs. In stream mode, it has no affect.
  • Field Summary

    Fields inherited from class org.apache.flink.api.dag.Transformation

    bufferTimeout, description, id, name, outputType, typeUsed, UPPER_BOUND_MAX_PARALLELISM
  • Constructor Summary

    Constructors
    Constructor
    Description
    CacheTransformation(org.apache.flink.api.dag.Transformation<T> transformationToCache, String name)
    Creates a new Transformation with the given name, output type and parallelism.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.flink.util.AbstractID
     
    List<org.apache.flink.api.dag.Transformation<?>>
     
    org.apache.flink.api.dag.Transformation<T>
     
    protected List<org.apache.flink.api.dag.Transformation<?>>
     
    boolean
     
    void
    setCached(boolean cached)
     

    Methods inherited from class org.apache.flink.api.dag.Transformation

    declareManagedMemoryUseCaseAtOperatorScope, declareManagedMemoryUseCaseAtSlotScope, enableAsyncState, equals, getAttribute, getBufferTimeout, getCoLocationGroupKey, getDescription, getId, getManagedMemoryOperatorScopeUseCaseWeights, getManagedMemorySlotScopeUseCases, getMaxParallelism, getMinResources, getName, getNewNodeId, getOutputType, getParallelism, getPreferredResources, getSlotSharingGroup, getTransitivePredecessors, getUid, getUserProvidedNodeHash, hashCode, isParallelismConfigured, setAttribute, setBufferTimeout, setCoLocationGroupKey, setDescription, setMaxParallelism, setName, setOutputType, setParallelism, setParallelism, setResources, setSlotSharingGroup, setSlotSharingGroup, setUid, setUidHash, toString, updateManagedMemoryStateBackendUseCase

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • CacheTransformation

      public CacheTransformation(org.apache.flink.api.dag.Transformation<T> transformationToCache, String name)
      Creates a new Transformation with the given name, output type and parallelism.
      Parameters:
      name - The name of the Transformation, this will be shown in Visualizations and the Log
  • Method Details

    • getTransitivePredecessorsInternal

      protected List<org.apache.flink.api.dag.Transformation<?>> getTransitivePredecessorsInternal()
      Specified by:
      getTransitivePredecessorsInternal in class org.apache.flink.api.dag.Transformation<T>
    • getInputs

      public List<org.apache.flink.api.dag.Transformation<?>> getInputs()
      Specified by:
      getInputs in class org.apache.flink.api.dag.Transformation<T>
    • getDatasetId

      public org.apache.flink.util.AbstractID getDatasetId()
    • getTransformationToCache

      public org.apache.flink.api.dag.Transformation<T> getTransformationToCache()
    • setCached

      public void setCached(boolean cached)
    • isCached

      public boolean isCached()