{"record":{"id":"d11ffb124d2df152","repo":"apache/hadoop","slug":"checkpoint-cannot-be-an-absolute-path","errorCode":null,"errorMessage":"Checkpoint cannot be an absolute path","messagePattern":"Checkpoint cannot be an absolute path","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/checkpoint/FSCheckpointService.java","lineNumber":57,"sourceCode":"  private final CheckpointNamingService namingPolicy;\n  private final short replication;\n\n  public FSCheckpointService(FileSystem fs, Path base,\n      CheckpointNamingService namingPolicy, short replication) {\n    this.fs = fs;\n    this.base = base;\n    this.namingPolicy = namingPolicy;\n    this.replication = replication;\n  }\n\n  public CheckpointWriteChannel create()\n      throws IOException {\n\n    String name = namingPolicy.getNewName();\n\n    Path p = new Path(name);\n    if (p.isUriPathAbsolute()) {\n      throw new IOException(\"Checkpoint cannot be an absolute path\");\n    }\n    return createInternal(new Path(base, p));\n  }\n\n  CheckpointWriteChannel createInternal(Path name) throws IOException {\n\n    //create a temp file, fail if file exists\n    return new FSCheckpointWriteChannel(name, fs.create(tmpfile(name),\n          replication));\n  }\n\n  private static class FSCheckpointWriteChannel\n      implements CheckpointWriteChannel {\n    private boolean isOpen = true;\n    private final Path finalDst;\n    private final WritableByteChannel out;\n\n    FSCheckpointWriteChannel(Path finalDst, FSDataOutputStream out) {","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/checkpoint/FSCheckpointService.java#L39-L75","documentation":"Fires in FSCheckpointService.create after the naming policy produces a new checkpoint name: the resulting Path must be relative to the service's configured base directory. If the name resolves to an absolute path (p.isUriPathAbsolute()), writing there would escape the checkpoint area, so create() refuses with this IOException. The faulting input is the name returned by the naming policy.","triggerScenarios":"Thrown at hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/checkpoint/FSCheckpointService.java:57 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure the checkpoint path as a relative path under the checkpoint service's base directory, not an absolute path."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}