Interface FlinkService
-
- All Known Implementing Classes:
AbstractFlinkService
,NativeFlinkService
,StandaloneFlinkService
public interface FlinkService
Service for submitting and interacting with Flink clusters and jobs.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
FlinkService.CancelResult
Result of a cancel operation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
atLeastOneCheckpoint(org.apache.flink.configuration.Configuration conf)
FlinkService.CancelResult
cancelJob(FlinkDeployment deployment, SuspendMode suspendMode, org.apache.flink.configuration.Configuration conf)
FlinkService.CancelResult
cancelSessionJob(FlinkSessionJob sessionJob, SuspendMode suspendMode, 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)
CheckpointStatsResult
fetchCheckpointStats(java.lang.String jobId, java.lang.Long checkpointId, 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)
java.util.Optional<org.apache.flink.runtime.client.JobStatusMessage>
getJobStatus(org.apache.flink.configuration.Configuration conf, org.apache.flink.api.common.JobID jobId)
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)
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)
java.lang.String
triggerCheckpoint(java.lang.String jobId, org.apache.flink.core.execution.CheckpointType checkpointType, org.apache.flink.configuration.Configuration conf)
java.lang.String
triggerSavepoint(java.lang.String jobId, org.apache.flink.core.execution.SavepointFormatType savepointFormatType, java.lang.String savepointDirectory, 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)
-
atLeastOneCheckpoint
boolean atLeastOneCheckpoint(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)
-
getJobStatus
java.util.Optional<org.apache.flink.runtime.client.JobStatusMessage> getJobStatus(org.apache.flink.configuration.Configuration conf, org.apache.flink.api.common.JobID jobId) 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
FlinkService.CancelResult cancelJob(FlinkDeployment deployment, SuspendMode suspendMode, 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
FlinkService.CancelResult cancelSessionJob(FlinkSessionJob sessionJob, SuspendMode suspendMode, org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
triggerSavepoint
java.lang.String triggerSavepoint(java.lang.String jobId, org.apache.flink.core.execution.SavepointFormatType savepointFormatType, java.lang.String savepointDirectory, org.apache.flink.configuration.Configuration conf) throws java.lang.Exception
- Throws:
java.lang.Exception
-
triggerCheckpoint
java.lang.String triggerCheckpoint(java.lang.String jobId, org.apache.flink.core.execution.CheckpointType checkpointType, 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)
-
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)
-
fetchCheckpointStats
CheckpointStatsResult fetchCheckpointStats(java.lang.String jobId, java.lang.Long checkpointId, 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
-
-