InputT
- The input type of the SinkWriter
CommT
- The committable type of the SinkWriter
WriterStateT
- The state type of the SinkWriter
GlobalCommT
- The global committable type of the GlobalCommitter
@Internal public class SinkTransformation<InputT,CommT,WriterStateT,GlobalCommT> extends PhysicalTransformation<Object>
Transformation
for Sink
.bufferTimeout, id, idCounter, name, outputType, typeUsed, UPPER_BOUND_MAX_PARALLELISM
Constructor and Description |
---|
SinkTransformation(Transformation<InputT> input,
Sink<InputT,CommT,WriterStateT,GlobalCommT> sink,
String name,
int parallelism) |
Modifier and Type | Method and Description |
---|---|
Optional<Integer> |
declareManagedMemoryUseCaseAtOperatorScope(ManagedMemoryUseCase managedMemoryUseCase,
int weight)
Declares that this transformation contains certain operator scope managed memory use case.
|
void |
declareManagedMemoryUseCaseAtSlotScope(ManagedMemoryUseCase managedMemoryUseCase)
Declares that this transformation contains certain slot scope managed memory use case.
|
ChainingStrategy |
getChainingStrategy() |
List<Transformation<?>> |
getInputs()
Returns the
transformations that are the immediate predecessors of the
current transformation in the transformation graph. |
Sink<InputT,CommT,WriterStateT,GlobalCommT> |
getSink() |
List<Transformation<?>> |
getTransitivePredecessors()
Returns all transitive predecessor
Transformation s of this Transformation . |
void |
setChainingStrategy(ChainingStrategy strategy)
Sets the chaining strategy of this
Transformation . |
void |
setResources(ResourceSpec minResources,
ResourceSpec preferredResources)
Sets the minimum and preferred resources for this stream transformation.
|
void |
setUidHash(String uidHash)
Sets an user provided hash for this operator.
|
equals, getBufferTimeout, getCoLocationGroupKey, getId, getManagedMemoryOperatorScopeUseCaseWeights, getManagedMemorySlotScopeUseCases, getMaxParallelism, getMinResources, getName, getNewNodeId, getOutputType, getParallelism, getPreferredResources, getSlotSharingGroup, getUid, getUserProvidedNodeHash, hashCode, setBufferTimeout, setCoLocationGroupKey, setMaxParallelism, setName, setOutputType, setParallelism, setSlotSharingGroup, setUid, toString, updateManagedMemoryStateBackendUseCase
public SinkTransformation(Transformation<InputT> input, Sink<InputT,CommT,WriterStateT,GlobalCommT> sink, String name, int parallelism)
public void setChainingStrategy(ChainingStrategy strategy)
PhysicalTransformation
Transformation
.setChainingStrategy
in class PhysicalTransformation<Object>
public List<Transformation<?>> getTransitivePredecessors()
Transformation
Transformation
s of this Transformation
.
This is, for example, used when determining whether a feedback edge of an iteration actually
has the iteration head as a predecessor.getTransitivePredecessors
in class Transformation<Object>
public List<Transformation<?>> getInputs()
Transformation
transformations
that are the immediate predecessors of the
current transformation in the transformation graph.getInputs
in class Transformation<Object>
public void setUidHash(String uidHash)
Transformation
The user provided hash is an alternative to the generated hashes, that is considered when identifying an operator through the default hash mechanics fails (e.g. because of changes between Flink versions).
Important: this should be used as a workaround or for trouble shooting. The provided hash needs to be unique per transformation and job. Otherwise, job submission will fail. Furthermore, you cannot assign user-specified hash to intermediate nodes in an operator chain and trying so will let your job fail.
A use case for this is in migration between Flink versions or changing the jobs in a way that changes the automatically generated hashes. In this case, providing the previous hashes directly through this method (e.g. obtained from old logs) can help to reestablish a lost mapping from states to their target operator.
setUidHash
in class Transformation<Object>
uidHash
- The user provided hash for this operator. This will become the JobVertexID,
which is shown in the logs and web ui.public void setResources(ResourceSpec minResources, ResourceSpec preferredResources)
Transformation
setResources
in class Transformation<Object>
minResources
- The minimum resource of this transformation.preferredResources
- The preferred resource of this transformation.public Optional<Integer> declareManagedMemoryUseCaseAtOperatorScope(ManagedMemoryUseCase managedMemoryUseCase, int weight)
Transformation
declareManagedMemoryUseCaseAtOperatorScope
in class Transformation<Object>
managedMemoryUseCase
- The use case that this transformation declares needing managed
memory for.weight
- Use-case-specific weights for this transformation. Used for sharing managed
memory across transformations for OPERATOR scope use cases.public void declareManagedMemoryUseCaseAtSlotScope(ManagedMemoryUseCase managedMemoryUseCase)
Transformation
declareManagedMemoryUseCaseAtSlotScope
in class Transformation<Object>
managedMemoryUseCase
- The use case that this transformation declares needing managed
memory for.public ChainingStrategy getChainingStrategy()
public Sink<InputT,CommT,WriterStateT,GlobalCommT> getSink()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.