Class AbstractKubernetesStepDecorator
- java.lang.Object
-
- org.apache.flink.kubernetes.kubeclient.decorators.AbstractKubernetesStepDecorator
-
- All Implemented Interfaces:
KubernetesStepDecorator
- Direct Known Subclasses:
CmdJobManagerDecorator
,CmdTaskManagerDecorator
,EnvSecretsDecorator
,ExternalServiceDecorator
,FlinkConfMountDecorator
,HadoopConfMountDecorator
,InitJobManagerDecorator
,InitTaskManagerDecorator
,InternalServiceDecorator
,KerberosMountDecorator
,MountSecretsDecorator
,PodTemplateMountDecorator
public abstract class AbstractKubernetesStepDecorator extends Object implements KubernetesStepDecorator
An abstractKubernetesStepDecorator
contains common implementations for different plug-in features.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Logger
logger
-
Constructor Summary
Constructors Constructor Description AbstractKubernetesStepDecorator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<io.fabric8.kubernetes.api.model.HasMetadata>
buildAccompanyingKubernetesResources()
Note that the method could have a side effect of modifying the Flink Configuration object, such as update the JobManager address.FlinkPod
decorateFlinkPod(FlinkPod flinkPod)
Apply transformations on the given FlinkPod in accordance to this feature.
-
-
-
Method Detail
-
decorateFlinkPod
public FlinkPod decorateFlinkPod(FlinkPod flinkPod)
Apply transformations on the given FlinkPod in accordance to this feature. Note that we should return a FlinkPod that keeps all of the properties of the passed FlinkPod object.So this is correct:
Pod decoratedPod = new PodBuilder(pod) // Keeps the original state ... .build() Container decoratedContainer = new ContainerBuilder(container) // Keeps the original state ... .build() FlinkPod decoratedFlinkPod = new FlinkPodBuilder(flinkPod) // Keeps the original state ... .build()
And this is the incorrect:
Pod decoratedPod = new PodBuilder() // Loses the original state ... .build() Container decoratedContainer = new ContainerBuilder() // Loses the original state ... .build() FlinkPod decoratedFlinkPod = new FlinkPodBuilder() // Loses the original state ... .build()
- Specified by:
decorateFlinkPod
in interfaceKubernetesStepDecorator
-
buildAccompanyingKubernetesResources
public List<io.fabric8.kubernetes.api.model.HasMetadata> buildAccompanyingKubernetesResources() throws IOException
Note that the method could have a side effect of modifying the Flink Configuration object, such as update the JobManager address.- Specified by:
buildAccompanyingKubernetesResources
in interfaceKubernetesStepDecorator
- Throws:
IOException
-
-