{"record":{"id":"c6b73297d345e374","repo":"apache/seatunnel","slug":"no-checkpoint-found-job-jobid-pipeline-pip","errorCode":null,"errorMessage":"No checkpoint found, job(${jobId}), pipeline(${pipelineId}), checkpoint(${checkpointId})","messagePattern":"No checkpoint found, job\\((.+?)\\), pipeline\\((.+?)\\), checkpoint\\((.+?)\\)","errorType":"exception","errorClass":"CheckpointStorageException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-hdfs/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/hdfs/HdfsStorage.java","lineNumber":270,"sourceCode":"            log.info(\"No checkpoint found for this job,  the job id is: \" + jobId);\n            return null;\n        }\n        for (String fileName : fileNames) {\n            if (pipelineId.equals(getPipelineIdByFileName(fileName))\n                    && checkpointId.equals(getCheckpointIdByFileName(fileName))) {\n                try {\n                    return readPipelineState(fileName, jobId);\n                } catch (Exception e) {\n                    log.error(\n                            \"Failed to get checkpoint {} for job {}, pipeline {}\",\n                            checkpointId,\n                            jobId,\n                            pipelineId,\n                            e);\n                }\n            }\n        }\n        throw new CheckpointStorageException(\n                String.format(\n                        \"No checkpoint found, job(%s), pipeline(%s), checkpoint(%s)\",\n                        jobId, pipelineId, checkpointId));\n    }\n\n    @Override\n    public synchronized void deleteCheckpoint(String jobId, String pipelineId, String checkpointId)\n            throws CheckpointStorageException {\n        String path = getStorageParentDirectory() + jobId;\n        List<String> fileNames = getFileNames(path);\n        if (fileNames.isEmpty()) {\n            throw new CheckpointStorageException(\n                    \"No checkpoint found for job, job id is: \" + jobId);\n        }\n        fileNames.forEach(\n                fileName -> {\n                    if (pipelineId.equals(getPipelineIdByFileName(fileName))\n                            && checkpointId.equals(getCheckpointIdByFileName(fileName))) {","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-storage/checkpoint-storage-plugins/checkpoint-storage-hdfs/src/main/java/org/apache/seatunnel/engine/checkpoint/storage/hdfs/HdfsStorage.java#L252-L288","documentation":"HdfsStorage.getCheckpoint throws CheckpointStorageException when it cannot locate a checkpoint file matching the given jobId, pipelineId and checkpointId in the HDFS storage directory. The storage walks the job directory, tries to read matching files, and if nothing matches (or reading fails per-file) it falls through to this final throw. It signals the requested checkpoint simply does not exist in storage.","triggerScenarios":"Calling getCheckpoint(jobId, pipelineId, checkpointId) with an ID combination that has no corresponding checkpoint file in the job's HDFS directory, e.g. asking for an already-deleted checkpoint or a typo'd checkpointId.","commonSituations":"Querying a checkpoint after job cleanup/retention deleted it; stale job metadata referencing purged checkpoints; cluster misconfiguration pointing at the wrong storage directory; checkpoint never completed so the file was never written.","solutions":["Verify the jobId/pipelineId/checkpointId triple exists by listing files under the storage parent directory + jobId.","Confirm the storage directory configuration (storage parent path) points at the cluster where the job actually ran.","Re-run the job or fall back to getLatestCheckpoint if you need the most recent checkpoint rather than an exact one.","Handle CheckpointStorageException in the caller and treat it as 'not found' rather than retrying."],"exampleFix":"// before\nCheckpointData data = storage.getCheckpoint(jobId, pipelineId, unknownCheckpointId);\n// after\nCheckpointData data;\ntry {\n    data = storage.getCheckpoint(jobId, pipelineId, unknownCheckpointId);\n} catch (CheckpointStorageException e) {\n    data = storage.getLatestCheckpoint(jobId, pipelineId);\n}","handlingStrategy":"try-catch","validationCode":"// Check the checkpoint file exists before reading\nList<String> names = java.util.Arrays.asList(\n    new org.apache.hadoop.fs.Path(parentDir + jobId).getFileSystem(conf)\n        .listStatus(new org.apache.hadoop.fs.Path(parentDir + jobId))\n).stream().map(s -> s.getPath().getName())\n .filter(n -> n.contains(pipelineId) && n.contains(checkpointId))\n .collect(java.util.stream.Collectors.toList());\nboolean exists = !names.isEmpty();","typeGuard":"boolean checkpointExists(String jobId, String pipelineId, String checkpointId) {\n    try { storage.getCheckpoint(jobId, pipelineId, checkpointId); return true; }\n    catch (CheckpointStorageException e) { return false; }\n}","tryCatchPattern":"try {\n    CheckpointData cp = storage.getCheckpoint(jobId, pipelineId, checkpointId);\n} catch (CheckpointStorageException e) {\n    if (e.getMessage().startsWith(\"No checkpoint found\")) {\n        // treat as not-found: use latest checkpoint or fail job recovery explicitly\n    } else { throw e; }\n}","preventionTips":["Derive checkpoint IDs from stored metadata rather than hardcoding or reconstructing them.","Use getLatestCheckpoint when any recent checkpoint is acceptable instead of an exact ID.","Confirm the storage parent directory config matches the cluster where the job ran.","Account for checkpoint retention/cleanup deleting files before you query them."],"tags":["checkpoint","hdfs","not-found","storage"],"backgroundTag":"resource-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}