{"record":{"id":"adc2227a09fa5755","repo":"apache/hadoop","slug":"unable-to-locate-storage-class-check-mapreduce-jo","errorCode":null,"errorMessage":"Unable to locate storage class, check mapreduce.jobhistory.recovery.store.class","messagePattern":"Unable to locate storage class, check mapreduce\\.jobhistory\\.recovery\\.store\\.class","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryServerStateStoreServiceFactory.java","lineNumber":42,"sourceCode":"public class HistoryServerStateStoreServiceFactory {\n\n  /**\n   * Constructs an instance of the configured storage class\n   * \n   * @param conf the configuration\n   * @return the state storage instance\n   */\n  public static HistoryServerStateStoreService getStore(Configuration conf) {\n    Class<? extends HistoryServerStateStoreService> storeClass =\n        HistoryServerNullStateStoreService.class;\n    boolean recoveryEnabled = conf.getBoolean(\n        JHAdminConfig.MR_HS_RECOVERY_ENABLE,\n        JHAdminConfig.DEFAULT_MR_HS_RECOVERY_ENABLE);\n    if (recoveryEnabled) {\n      storeClass = conf.getClass(JHAdminConfig.MR_HS_STATE_STORE, null,\n          HistoryServerStateStoreService.class);\n      if (storeClass == null) {\n        throw new RuntimeException(\"Unable to locate storage class, check \"\n            + JHAdminConfig.MR_HS_STATE_STORE);\n      }\n    }\n    return ReflectionUtils.newInstance(storeClass, conf);\n  }\n}\n","sourceCodeStart":24,"sourceCodeEnd":49,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryServerStateStoreServiceFactory.java#L24-L49","documentation":"HistoryServerStateStoreServiceFactory.getStore selects the state store implementation when recovery is enabled. conf.getClass for mapreduce.jobhistory.recovery.store.class returning null (property unset) triggers this RuntimeException and aborts JHS startup. A typo'd class value instead surfaces a ClassNotFoundException from conf.getClass, so this exact message specifically means the property is missing.","triggerScenarios":"mapreduce.jobhistory.recovery.enable=true without mapreduce.jobhistory.recovery.store.class set; configuration enabling recovery in only some config files; recovery turned on by a management tool without the companion store class.","commonSituations":"Following recovery documentation that omits the store class; partial config rollout; enabling recovery for testing and forgetting the store implementation.","solutions":["Set mapreduce.jobhistory.recovery.store.class to org.apache.hadoop.mapreduce.v2.hs.HistoryServerLeveldbStateStoreService or org.apache.hadoop.mapreduce.v2.hs.HistoryServerFileSystemStateStoreService in mapred-site.xml.","For the LevelDB store also set mapreduce.jobhistory.recovery.store.leveldb.path; for the filesystem store set mapreduce.jobhistory.recovery.store.fs.uri.","If recovery is not intended, set mapreduce.jobhistory.recovery.enable=false.","Restart the JobHistoryServer."],"exampleFix":"<!-- before -->\n<property>\n  <name>mapreduce.jobhistory.recovery.enable</name>\n  <value>true</value>\n</property>\n\n<!-- after -->\n<property>\n  <name>mapreduce.jobhistory.recovery.enable</name>\n  <value>true</value>\n</property>\n<property>\n  <name>mapreduce.jobhistory.recovery.store.class</name>\n  <value>org.apache.hadoop.mapreduce.v2.hs.HistoryServerLeveldbStateStoreService</value>\n</property>","handlingStrategy":"validation","validationCode":"# fail fast before JHS start: recovery enabled requires a store class\nif grep -q 'mapreduce.jobhistory.recovery.enable.*true' /etc/hadoop/conf/mapred-site.xml; then\n  grep -q 'mapreduce.jobhistory.recovery.store.class' /etc/hadoop/conf/mapred-site.xml \\\n    || { echo 'mapreduce.jobhistory.recovery.store.class missing'; exit 1; }\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set store class and its companion path/URI properties together.","Use fully qualified class names from the target Hadoop version.","Smoke-test JHS startup in staging after enabling recovery."],"tags":["mapreduce","job-history-server","recovery","configuration","startup"],"backgroundTag":"class-not-found","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}