Interface FlinkService
-
- All Known Implementing Classes:
AbstractFlinkService
,NativeFlinkService
,StandaloneFlinkService
public interface FlinkService
Service for submitting and interacting with Flink clusters and jobs.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
cancelJob(FlinkDeployment deployment, UpgradeMode upgradeMode, org.apache.flink.configuration.Configuration conf)
void
cancelSessionJob(FlinkSessionJob sessionJob, UpgradeMode upgradeMode, org.apache.flink.configuration.Configuration conf)
void
deleteClusterDeployment(io.fabric8.kubernetes.api.model.ObjectMeta meta, FlinkDeploymentStatus status, org.apache.flink.configuration.Configuration conf, boolean deleteHaData)
void
disposeSavepoint(java.lang.String savepointPath, org.apache.flink.configuration.Configuration conf)
SavepointFetchResult
fetchSavepointInfo(java.lang.String triggerId, java.lang.String jobId, org.apache.flink.configuration.Configuration conf)
org.apache.flink.api.java.tuple.Tuple2<java.util.Optional<CheckpointHistoryWrapper.CompletedCheckpointInfo>,java.util.Optional<CheckpointHistoryWrapper.PendingCheckpointInfo>>
getCheckpointInfo(org.apache.flink.api.common.JobID jobId, org.apache.flink.configuration.Configuration conf)
org.apache.flink.client.program.ClusterClient<java.lang.String>
getClusterClient(org.apache.flink.configuration.Configuration conf)
java.util.Map<java.lang.String,java.lang.String>
getClusterInfo(org.apache.flink.configuration.Configuration conf)
io.fabric8.kubernetes.api.model.PodList
getJmPodList(FlinkDeployment deployment, org.apache.flink.configuration.Configuration conf)
io.fabric8.kubernetes.client.KubernetesClient
getKubernetesClient()
java.util.Optional<Savepoint>
getLastCheckpoint(org.apache.flink.api.common.JobID jobId, org.apache.flink.configuration.Configuration conf)
java.util.Map<java.lang.String,java.lang.String>
getMetrics(org.apache.flink.configuration.Configuration conf, java.lang.String jobId, java.util.List<java.lang.String> metricNames)
boolean
isHaMetadataAvailable(org.apache.flink.configuration.Configuration conf)
boolean
isJobManagerPortReady(org.apache.flink.configuration.Configuration config)
java.util.Collection<org.apache.flink.runtime.client.JobStatusMessage>
listJobs(org.apache.flink.configuration.Configuration conf)
org.apache.flink.runtime.jobmaster.JobResult
requestJobResult(org.apache.flink.configuration.Configuration conf, org.apache.flink.api.common.JobID jobID)
default boolean
scale(io.fabric8.kubernetes.api.model.ObjectMeta meta, JobSpec jobSpec, org.apache.flink.configuration.Configuration conf)
void
submitApplicationCluster(JobSpec jobSpec, org.apache.flink.configuration.Configuration conf, boolean requireHaMetadata)
org.apache.flink.api.common.JobID
submitJobToSessionCluster(io.fabric8.kubernetes.api.model.ObjectMeta meta, FlinkSessionJobSpec spec, org.apache.flink.configuration.Configuration conf, java.lang.String savepoint)
void
submitSessionCluster(org.apache.flink.configuration.Configuration conf)
void
triggerSavepoint(java.lang.String jobId, SavepointTriggerType triggerType, SavepointInfo savepointInfo, org.apache.flink.configuration.Configuration conf)
void
waitForClusterShutdown(org.apache.flink.configuration.Configuration conf)
-
-
-
Method Detail
-
getKubernetesClient
io.fabric8.kubernetes.client.KubernetesClient getKubernetesClient()
-
submitApplicationCluster
void submitApplicationCluster(JobSpec jobSpec, org.apache.flink.configuration.Configuration conf, boolean requireHaMetadata) throws java.lang.Exception
- Throws:
java.lang.Exception
-
isHaMetadataAvailable
boolean isHaMetadataAvailable(org.apache.flink.configuration.Configuration conf)
-
submitSessionCluster
void submitSessionCluster(org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
submitJobToSessionCluster
org.apache.flink.api.common.JobID submitJobToSessionCluster(io.fabric8.kubernetes.api.model.ObjectMeta meta, FlinkSessionJobSpec spec, org.apache.flink.configuration.Configuration conf, @Nullable java.lang.String savepoint) throws java.lang.Exception
- Throws:
java.lang.Exception
-
isJobManagerPortReady
boolean isJobManagerPortReady(org.apache.flink.configuration.Configuration config)
-
listJobs
java.util.Collection<org.apache.flink.runtime.client.JobStatusMessage> listJobs(org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
requestJobResult
org.apache.flink.runtime.jobmaster.JobResult requestJobResult(org.apache.flink.configuration.Configuration conf, org.apache.flink.api.common.JobID jobID) throws java.lang.Exception
- Throws:
java.lang.Exception
-
cancelJob
void cancelJob(FlinkDeployment deployment, UpgradeMode upgradeMode, org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
deleteClusterDeployment
void deleteClusterDeployment(io.fabric8.kubernetes.api.model.ObjectMeta meta, FlinkDeploymentStatus status, org.apache.flink.configuration.Configuration conf, boolean deleteHaData)
-
cancelSessionJob
void cancelSessionJob(FlinkSessionJob sessionJob, UpgradeMode upgradeMode, org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
triggerSavepoint
void triggerSavepoint(java.lang.String jobId, SavepointTriggerType triggerType, SavepointInfo savepointInfo, org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getLastCheckpoint
java.util.Optional<Savepoint> getLastCheckpoint(org.apache.flink.api.common.JobID jobId, org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
fetchSavepointInfo
SavepointFetchResult fetchSavepointInfo(java.lang.String triggerId, java.lang.String jobId, org.apache.flink.configuration.Configuration conf)
-
getCheckpointInfo
org.apache.flink.api.java.tuple.Tuple2<java.util.Optional<CheckpointHistoryWrapper.CompletedCheckpointInfo>,java.util.Optional<CheckpointHistoryWrapper.PendingCheckpointInfo>> getCheckpointInfo(org.apache.flink.api.common.JobID jobId, org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
disposeSavepoint
void disposeSavepoint(java.lang.String savepointPath, org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getClusterInfo
java.util.Map<java.lang.String,java.lang.String> getClusterInfo(org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getJmPodList
io.fabric8.kubernetes.api.model.PodList getJmPodList(FlinkDeployment deployment, org.apache.flink.configuration.Configuration conf)
-
waitForClusterShutdown
void waitForClusterShutdown(org.apache.flink.configuration.Configuration conf)
-
scale
default boolean scale(io.fabric8.kubernetes.api.model.ObjectMeta meta, JobSpec jobSpec, org.apache.flink.configuration.Configuration conf)
-
getMetrics
java.util.Map<java.lang.String,java.lang.String> getMetrics(org.apache.flink.configuration.Configuration conf, java.lang.String jobId, java.util.List<java.lang.String> metricNames) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getClusterClient
org.apache.flink.client.program.ClusterClient<java.lang.String> getClusterClient(org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-