{"record":{"id":"94da76b1d33e1eff","repo":"apache/hadoop","slug":"no-latest-state-persist-directory-found-disable-p","errorCode":null,"errorMessage":"No latest state persist directory found! Disable persistence and run.","messagePattern":"No latest state persist directory found! Disable persistence and run\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/state/StatePool.java","lineNumber":189,"sourceCode":"    // reload\n    reload();\n    \n    // now set the timestamp\n    DateFormat formatter = \n      new SimpleDateFormat(\"dd-MMM-yyyy-hh'H'-mm'M'-ss'S'\");\n    Calendar calendar = Calendar.getInstance();\n    calendar.setTimeInMillis(System.currentTimeMillis());\n    timeStamp = formatter.format(calendar.getTime());\n    \n    isInitialized = true;\n  }\n  \n  private void reload() throws Exception {\n    if (reload) {\n      // Reload persisted entries\n      Path stateFilename = new Path(persistDirPath, COMMIT_STATE_FILENAME);\n      if (!reloadState(stateFilename, conf)) {\n        throw new RuntimeException(\"No latest state persist directory found!\"\n                                   + \" Disable persistence and run.\");\n      }\n    }\n  }\n  \n  private boolean reloadState(Path stateFile, Configuration configuration)\n      throws Exception {\n    FileSystem fs = stateFile.getFileSystem(configuration);\n    try (FSDataInputStream in = fs.open(stateFile)) {\n      System.out.println(\"Reading state from \" + stateFile.toString());\n      read(in);\n      return true;\n    } catch (FileNotFoundException e) {\n      System.out.println(\"No state information found for \" + stateFile);\n      return false;\n    }\n  }\n  ","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/state/StatePool.java#L171-L207","documentation":"Error \"No latest state persist directory found! Disable persistence and run.\" thrown in apache/hadoop.","triggerScenarios":"StatePool finds no previously persisted state directory to load from, so it starts without restored state.","commonSituations":"See trigger scenarios.","solutions":["Run once to produce a state directory, or point the configuration at an existing state directory; otherwise persistence is skipped."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}