Lydian Lee
04/17/2024, 8:14 PMjob settings:
job:
allowNonRestoredState: true
args:
- command to run my job
entryClass: org.apache.beam.runners.flink.FlinkPortableClientEntryPoint
jarURI: local:///opt/flink/flink-web-upload/beam-runner.jar
parallelism: 32
state: running
upgradeMode: last-state
and here's my `flinkConfiguration`:
flinkConfiguration:
fs.s3a.aws.credentials.provider: com.amazonaws.auth.WebIdentityTokenCredentialsProvider
high-availability: org.apache.flink.kubernetes.highavailability.KubernetesHaServicesFactory
high-availability.storageDir: s3://path/high-availability
state.backend: rocksdb
state.backend.fs.checkpointdir: file:///checkpoints/flink/checkpoints
state.backend.incremental: "true"
state.checkpoints.dir: s3a://path/checkpoints
state.savepoints.dir: s3a://path/savepoints
But I noticed that sometimes if I want to deploy a new version of code change (usually just new docker image with some internal library change), some of the flinkdeployment app failed with:
Caused by: java.io.FileNotFoundException: Cannot find checkpoint or savepoint file/directory 's3a://path/savepoints/savepoint-2254eb-61d7c7a6f6a3' on file
at org.apache.flink.runtime.state.filesystem.AbstractFsCheckpointStorageAccess.resolveCheckpointPointer(AbstractFsCheckpointStorageAccess.java:275)
at org.apache.flink.runtime.state.filesystem.AbstractFsCheckpointStorageAccess.resolveCheckpoint(AbstractFsCheckpointStorageAccess.java:136)
at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.restoreSavepoint(CheckpointCoordinator.java:1639)
at org.apache.flink.runtime.scheduler.DefaultExecutionGraphFactory.tryRestoreExecutionGraphFromSavepoint(DefaultExecutionGraphFactory.java:163)
at org.apache.flink.runtime.scheduler.DefaultExecutionGraphFactory.createAndRestoreExecutionGraph(DefaultExecutionGraphFactory.java:138)
at org.apache.flink.runtime.scheduler.SchedulerBase.createAndRestoreExecutionGraph(SchedulerBase.java:335)
at org.apache.flink.runtime.scheduler.SchedulerBase.init(SchedulerBase.java:191)
at org.apache.flink.runtime.scheduler.DefaultScheduler.init(DefaultScheduler.java:140)
at org.apache.flink.runtime.scheduler.DefaultSchedulerFactory.createInstance(DefaultSchedulerFactory.java:134)
at org.apache.flink.runtime.jobmaster.DefaultSlotPoolServiceSchedulerFactory.createScheduler(DefaultSlotPoolServiceSchedulerFactory.java:110)
at org.apache.flink.runtime.jobmaster.JobMaster.createScheduler(JobMaster.java:346)
at org.apache.flink.runtime.jobmaster.JobMaster.init(JobMaster.java:323)
at org.apache.flink.runtime.jobmaster.factories.DefaultJobMasterServiceFactory.internalCreateJobMasterService(DefaultJobMasterServiceFactory.java:106)
at org.apache.flink.runtime.jobmaster.factories.DefaultJobMasterServiceFactory.lambda$createJobMasterService$0(DefaultJobMasterServiceFactory.java:94)
at org.apache.flink.util.function.FunctionUtils.lambda$uncheckedSupplier$4(FunctionUtils.java:112)
Wondering if anyone know how can I fix this issue? Thanks
I've double checked the savepoint doesn't seem to appear in my code. but I wonder how the flink app get this non-exists savepoint folder? and also is it possible to force it to use the latest checkpoint if it is unable to find the savepoint folder ?
another FYI that we don't have s3 lifecycle configured and i've confirmed no one trying to manually delete things on this checkpoint/savepoint path.