Class StandaloneFlinkService
- java.lang.Object
-
- org.apache.flink.kubernetes.operator.service.AbstractFlinkService
-
- org.apache.flink.kubernetes.operator.service.StandaloneFlinkService
-
- All Implemented Interfaces:
FlinkService
public class StandaloneFlinkService extends AbstractFlinkService
Implementation ofFlinkService
submitting and interacting with Standalone Kubernetes Flink clusters and jobs.
-
-
Field Summary
-
Fields inherited from class org.apache.flink.kubernetes.operator.service.AbstractFlinkService
artifactManager, configManager, kubernetesClient
-
-
Constructor Summary
Constructors Constructor Description StandaloneFlinkService(io.fabric8.kubernetes.client.KubernetesClient kubernetesClient, FlinkConfigManager configManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelJob(FlinkDeployment deployment, UpgradeMode upgradeMode, org.apache.flink.configuration.Configuration conf)
protected FlinkStandaloneKubeClient
createNamespacedKubeClient(org.apache.flink.configuration.Configuration configuration)
protected void
deleteClusterInternal(io.fabric8.kubernetes.api.model.ObjectMeta meta, org.apache.flink.configuration.Configuration conf, boolean deleteHaData)
Delete Flink kubernetes cluster by deleting the kubernetes resources directly.protected void
deployApplicationCluster(JobSpec jobSpec, org.apache.flink.configuration.Configuration conf)
protected io.fabric8.kubernetes.api.model.PodList
getJmPodList(java.lang.String namespace, java.lang.String clusterId)
boolean
scale(io.fabric8.kubernetes.api.model.ObjectMeta meta, JobSpec jobSpec, org.apache.flink.configuration.Configuration conf)
protected void
submitClusterInternal(org.apache.flink.configuration.Configuration conf, Mode mode)
void
submitSessionCluster(org.apache.flink.configuration.Configuration conf)
-
Methods inherited from class org.apache.flink.kubernetes.operator.service.AbstractFlinkService
cancelJob, cancelSessionJob, deleteClusterDeployment, deleteHAData, disposeSavepoint, fetchSavepointInfo, getClusterClient, getClusterInfo, getEffectiveStatus, getJmPodList, getKubernetesClient, getLastCheckpoint, getMetrics, isHaMetadataAvailable, isJobManagerPortReady, listJobs, removeOperatorConfigs, requestJobResult, submitApplicationCluster, submitJobToSessionCluster, triggerSavepoint, updateStatusAfterClusterDeletion, waitForClusterShutdown
-
-
-
-
Constructor Detail
-
StandaloneFlinkService
public StandaloneFlinkService(io.fabric8.kubernetes.client.KubernetesClient kubernetesClient, FlinkConfigManager configManager)
-
-
Method Detail
-
deployApplicationCluster
protected void deployApplicationCluster(JobSpec jobSpec, org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Specified by:
deployApplicationCluster
in classAbstractFlinkService
- Throws:
java.lang.Exception
-
submitSessionCluster
public void submitSessionCluster(org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
cancelJob
public void cancelJob(FlinkDeployment deployment, UpgradeMode upgradeMode, org.apache.flink.configuration.Configuration conf) 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 classAbstractFlinkService
-
createNamespacedKubeClient
@VisibleForTesting protected FlinkStandaloneKubeClient createNamespacedKubeClient(org.apache.flink.configuration.Configuration configuration)
-
submitClusterInternal
protected void submitClusterInternal(org.apache.flink.configuration.Configuration conf, Mode mode) throws org.apache.flink.client.deployment.ClusterDeploymentException
- Throws:
org.apache.flink.client.deployment.ClusterDeploymentException
-
deleteClusterInternal
protected void deleteClusterInternal(io.fabric8.kubernetes.api.model.ObjectMeta meta, org.apache.flink.configuration.Configuration conf, boolean deleteHaData)
Description copied from class:AbstractFlinkService
Delete Flink kubernetes cluster by deleting the kubernetes resources directly. Optionally allows deleting the native kubernetes HA resources as well.- Specified by:
deleteClusterInternal
in classAbstractFlinkService
- Parameters:
meta
- ObjectMeta of the deploymentconf
- Configuration of the Flink applicationdeleteHaData
- Flag to indicate whether k8s or Zookeeper HA metadata should be removed as well
-
scale
public boolean scale(io.fabric8.kubernetes.api.model.ObjectMeta meta, JobSpec jobSpec, org.apache.flink.configuration.Configuration conf)
-
-