{"record":{"id":"da5aee6a37c7b4c7","repo":"apache/hadoop","slug":"the-quota-system-is-disabled-in-router-da5aee","errorCode":null,"errorMessage":"The quota system is disabled in Router.","messagePattern":"The quota system is disabled in Router\\.","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/async/AsyncQuota.java","lineNumber":91,"sourceCode":"      } catch (IOException e) {\n        throw new CompletionException(e);\n      }\n    });\n    return asyncReturn(QuotaUsage.class);\n  }\n\n  /**\n   * Get quota usage for the federation path.\n   * @param path Federation path.\n   * @return quota usage for each remote location.\n   * @throws IOException If the quota system is disabled.\n   */\n  @Override\n  protected Map<RemoteLocation, QuotaUsage> getEachQuotaUsage(String path)\n      throws IOException {\n    rpcServer.checkOperation(NameNode.OperationCategory.READ);\n    if (!router.isQuotaEnabled()) {\n      throw new IOException(\"The quota system is disabled in Router.\");\n    }\n\n    final List<RemoteLocation> quotaLocs = getValidQuotaLocations(path);\n    RemoteMethod method = new RemoteMethod(\"getQuotaUsage\",\n        new Class<?>[] {String.class}, new RemoteParam());\n    rpcClient.invokeConcurrent(\n        quotaLocs, method, true, false, QuotaUsage.class);\n    return asyncReturn(Map.class);\n  }\n}\n","sourceCodeStart":73,"sourceCodeEnd":102,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/async/AsyncQuota.java#L73-L102","documentation":"AsyncQuota.getEachQuotaUsage throws IOException('The quota system is disabled in Router.') when a client requests quota usage through the Router's async path while the Router-level quota system is off. RBF quotas are gated by dfs.federation.router.quota.enabled (default false) in the Router configuration; without it the Router keeps no aggregated quota state and cannot answer getQuotaUsage for federation paths.","triggerScenarios":"Client calls getQuotaUsage/hdfs dfs -count -q or quota admin flows through the Router (async RPC enabled) while dfs.federation.router.quota.enabled is unset/false in the Router's config.","commonSituations":"Default Router deployments that never enabled federation quotas; enabling quotas on some Routers but not others in an HA group; operators assuming per-NameNode quotas imply Router quota support.","solutions":["Set dfs.federation.router.quota.enabled=true in the Router's configuration (with dfs.federation.router.quota.* limits as needed) and restart/reload the Router","Alternatively query quota usage directly from each subcluster NameNode and aggregate client-side","Verify the flag on every Router behind the load balancer, not just one"],"exampleFix":"<!-- before: router config lacks quota -->\n<configuration/>\n\n<!-- after: router (hdfs-rbf) config -->\n<configuration>\n  <property>\n    <name>dfs.federation.router.quota.enabled</name>\n    <value>true</value>\n  </property>\n</configuration>","handlingStrategy":"try-catch","validationCode":"// Read Router config before quota calls:\n// conf.getBoolean(\"dfs.federation.router.quota.enabled\", false) must be true\n// on the Router; clients can check the router's /conf endpoint if exposed.","typeGuard":null,"tryCatchPattern":"catch (IOException e) {\n  if (e.getMessage().equals(\"The quota system is disabled in Router.\")) {\n    // fall back to per-subcluster getQuotaUsage and aggregate client-side\n  }\n}","preventionTips":["Enable dfs.federation.router.quota.enabled on all Routers if any client needs federation quota views","Keep Router configurations identical across HA Router instances","Document that per-NameNode quotas are invisible through the Router unless federation quotas are on"],"tags":["hadoop","hdfs","rbf","quota","configuration","async-rpc"],"backgroundTag":"feature-disabled-by-config","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}