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 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)
CheckpointFetchResult
fetchCheckpointInfo(java.lang.String triggerId, java.lang.String jobId, 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.rest.RestClusterClient<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)
boolean
scale(FlinkResourceContext<?> resourceContext, org.apache.flink.configuration.Configuration deployConfig)
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.api.common.JobID jobID, org.apache.flink.configuration.Configuration conf, java.lang.String savepoint)
void
submitSessionCluster(org.apache.flink.configuration.Configuration conf)
void
triggerCheckpoint(java.lang.String jobId, SnapshotTriggerType triggerType, CheckpointInfo checkpointInfo, org.apache.flink.configuration.Configuration conf)
void
triggerSavepoint(java.lang.String jobId, SnapshotTriggerType triggerType, SavepointInfo savepointInfo, 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.api.common.JobID jobID, 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, SnapshotTriggerType triggerType, SavepointInfo savepointInfo, org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
triggerCheckpoint
void triggerCheckpoint(java.lang.String jobId, SnapshotTriggerType triggerType, CheckpointInfo checkpointInfo, 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)
-
fetchCheckpointInfo
CheckpointFetchResult fetchCheckpointInfo(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)
-
scale
boolean scale(FlinkResourceContext<?> resourceContext, org.apache.flink.configuration.Configuration deployConfig) throws java.lang.Exception
- Throws:
java.lang.Exception
-
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.rest.RestClusterClient<java.lang.String> getClusterClient(org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-