{"record":{"id":"4550b2172a489f80","repo":"apache/hadoop","slug":"mount-table-state-store-is-not-available","errorCode":null,"errorMessage":"Mount table state store is not available.","messagePattern":"Mount table state store is not available\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/MountTableRefresherService.java","lineNumber":205,"sourceCode":"\n  @Override\n  protected void serviceStart() throws Exception {\n    super.serviceStart();\n  }\n\n  @Override\n  protected void serviceStop() throws Exception {\n    super.serviceStop();\n    clientCacheCleanerScheduler.shutdown();\n    // remove and close all admin clients\n    routerClientsCache.invalidateAll();\n  }\n\n  private MountTableStore getMountTableStore() throws IOException {\n    MountTableStore mountTblStore =\n        router.getStateStore().getRegisteredRecordStore(MountTableStore.class);\n    if (mountTblStore == null) {\n      throw new IOException(\"Mount table state store is not available.\");\n    }\n    return mountTblStore;\n  }\n\n  /**\n   * Refresh mount table cache of this router as well as all other routers.\n   *\n   * @throws StateStoreUnavailableException if the state store is not available.\n   */\n  public void refresh() throws StateStoreUnavailableException {\n    RouterStore routerStore = router.getRouterStateManager();\n\n    try {\n      routerStore.loadCache(true);\n    } catch (IOException e) {\n      LOG.warn(\"RouterStore load cache failed,\", e);\n    }\n","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/MountTableRefresherService.java#L187-L223","documentation":"MountTableRefresherService — the router's periodic mount-table cache refresher — obtains its MountTableStore via router.getStateStore().getRegisteredRecordStore(MountTableStore.class); a null registration throws IOException('Mount table state store is not available.'), meaning the router's state store driver never registered the mount table record store, so refresh cycles cannot run.","triggerScenarios":"The router's StateStoreService is not initialized or failed (dfs.federation.router.store.driver misconfigured, ZooKeeper/DB backend unreachable at startup), a custom driver lacks MountTableStore registration, or the refresher runs before the state store registered its record stores.","commonSituations":"State store backend outage during router startup; wrong driver class in router configuration; routers in clusters where the state store schema/records were only partially initialized.","solutions":["Verify dfs.federation.router.store.driver and backend connectivity (ZK ensemble / DB) from the router host","Check StateStoreService initialization logs — MountTableStore registers during state store init; fix any preceding errors","Restart the router after state store recovery so the refresher can fetch the store","For custom state store drivers, ensure MountTableStore is registered during initialization"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Check the store is registered before enabling/running the refresher\nMountTableStore store = router.getStateStore()\n    .getRegisteredRecordStore(MountTableStore.class);\nif (store == null) {\n  throw new IOException(\n      \"MountTableStore not registered; state store driver/backend check required\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify dfs.federation.router.store.driver and backend reachability before router start","Watch for StateStoreService initialization errors in router logs","Restart the router after state store recovery so the refresher re-binds the store"],"tags":["hadoop","rbf","router","state-store","mount-table","startup"],"backgroundTag":"store-interface-not-registered","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}