Class NativeFlinkService

    • Constructor Detail

      • NativeFlinkService

        public NativeFlinkService​(io.fabric8.kubernetes.client.KubernetesClient kubernetesClient,
                                  ArtifactManager artifactManager,
                                  java.util.concurrent.ExecutorService executorService,
                                  FlinkOperatorConfiguration operatorConfig,
                                  EventRecorder eventRecorder)
    • Method Detail

      • deployApplicationCluster

        protected void deployApplicationCluster​(JobSpec jobSpec,
                                                org.apache.flink.configuration.Configuration conf)
                                         throws java.lang.Exception
        Specified by:
        deployApplicationCluster in class AbstractFlinkService
        Throws:
        java.lang.Exception
      • deploySessionCluster

        public void deploySessionCluster​(org.apache.flink.configuration.Configuration conf)
                                  throws java.lang.Exception
        Specified by:
        deploySessionCluster in class AbstractFlinkService
        Throws:
        java.lang.Exception
      • cancelJob

        public void cancelJob​(FlinkDeployment deployment,
                              UpgradeMode upgradeMode,
                              org.apache.flink.configuration.Configuration configuration)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getJmPodList

        protected io.fabric8.kubernetes.api.model.PodList getJmPodList​(java.lang.String namespace,
                                                                       java.lang.String clusterId)
        Specified by:
        getJmPodList in class AbstractFlinkService
      • getTmPodList

        protected io.fabric8.kubernetes.api.model.PodList getTmPodList​(java.lang.String namespace,
                                                                       java.lang.String clusterId)
        Specified by:
        getTmPodList in class AbstractFlinkService
      • submitClusterInternal

        protected void submitClusterInternal​(org.apache.flink.configuration.Configuration conf)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • deleteClusterInternal

        protected void deleteClusterInternal​(java.lang.String namespace,
                                             java.lang.String clusterId,
                                             org.apache.flink.configuration.Configuration conf,
                                             io.fabric8.kubernetes.api.model.DeletionPropagation deletionPropagation)
        Description copied from class: AbstractFlinkService
        Delete Flink kubernetes cluster by deleting the kubernetes resources directly.
        Specified by:
        deleteClusterInternal in class AbstractFlinkService
        Parameters:
        namespace - Namespace
        clusterId - ClusterId
        conf - Configuration of the Flink application
        deletionPropagation - Resource deletion propagation policy
      • scale

        public boolean scale​(FlinkResourceContext<?> ctx,
                             org.apache.flink.configuration.Configuration deployConfig)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • updateVertexResources

        @VisibleForTesting
        protected void updateVertexResources​(org.apache.flink.client.program.rest.RestClusterClient<java.lang.String> client,
                                             AbstractFlinkResource<?,​?> resource,
                                             java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,​org.apache.flink.runtime.jobgraph.JobVertexResourceRequirements> newReqs)
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getVertexResources

        @VisibleForTesting
        protected java.util.Map<org.apache.flink.runtime.jobgraph.JobVertexID,​org.apache.flink.runtime.jobgraph.JobVertexResourceRequirements> getVertexResources​(org.apache.flink.client.program.rest.RestClusterClient<java.lang.String> client,
                                                                                                                                                                        AbstractFlinkResource<?,​?> resource)
                                                                                                                                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception