Class PodTemplateMountDecorator
- java.lang.Object
-
- org.apache.flink.kubernetes.kubeclient.decorators.AbstractKubernetesStepDecorator
-
- org.apache.flink.kubernetes.kubeclient.decorators.PodTemplateMountDecorator
-
- All Implemented Interfaces:
KubernetesStepDecorator
public class PodTemplateMountDecorator extends AbstractKubernetesStepDecorator
Ship and mountConstants.TASK_MANAGER_POD_TEMPLATE_FILE_NAMEon the JobManager.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.kubernetes.kubeclient.decorators.AbstractKubernetesStepDecorator
logger
-
-
Constructor Summary
Constructors Constructor Description PodTemplateMountDecorator(AbstractKubernetesParameters kubernetesComponentConf)
-
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.FlinkPoddecorateFlinkPod(FlinkPod flinkPod)Apply transformations on the given FlinkPod in accordance to this feature.
-
-
-
Constructor Detail
-
PodTemplateMountDecorator
public PodTemplateMountDecorator(AbstractKubernetesParameters kubernetesComponentConf)
-
-
Method Detail
-
decorateFlinkPod
public FlinkPod decorateFlinkPod(FlinkPod flinkPod)
Description copied from class:AbstractKubernetesStepDecoratorApply 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:
decorateFlinkPodin interfaceKubernetesStepDecorator- Overrides:
decorateFlinkPodin classAbstractKubernetesStepDecorator
-
buildAccompanyingKubernetesResources
public List<io.fabric8.kubernetes.api.model.HasMetadata> buildAccompanyingKubernetesResources() throws IOException
Description copied from class:AbstractKubernetesStepDecoratorNote that the method could have a side effect of modifying the Flink Configuration object, such as update the JobManager address.- Specified by:
buildAccompanyingKubernetesResourcesin interfaceKubernetesStepDecorator- Overrides:
buildAccompanyingKubernetesResourcesin classAbstractKubernetesStepDecorator- Throws:
IOException
-
-