{"record":{"id":"a67fea27d1cd8c33","repo":"apache/hadoop","slug":"the-quota-system-is-disabled-in-router","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/Quota.java","lineNumber":84,"sourceCode":"    this.router = router;\n    this.rpcServer = server;\n    this.rpcClient = server.getRPCClient();\n  }\n\n  /**\n   * Set quota for the federation path.\n   * @param path Federation path.\n   * @param namespaceQuota Name space quota.\n   * @param storagespaceQuota Storage space quota.\n   * @param type StorageType that the space quota is intended to be set on.\n   * @param checkMountEntry whether to check the path is a mount entry.\n   * @throws IOException If the quota system is disabled or if\n   * checkMountEntry is true and the path is a mount entry.\n   */\n  public void setQuota(String path, long namespaceQuota, long storagespaceQuota,\n      StorageType type, boolean checkMountEntry) throws IOException {\n    if (!router.isQuotaEnabled()) {\n      throw new IOException(\"The quota system is disabled in Router.\");\n    }\n    if (checkMountEntry && isMountEntry(path)) {\n      throw new AccessControlException(\n          \"Permission denied: \" + RouterRpcServer.getRemoteUser()\n              + \" is not allowed to change quota of \" + path);\n    }\n    setQuotaInternal(path, null, namespaceQuota, storagespaceQuota, type);\n  }\n\n  /**\n   * Set quota for the federation path.\n   * @param path Federation path.\n   * @param locations Locations of the Federation path.\n   * @param namespaceQuota Name space quota.\n   * @param storagespaceQuota Storage space quota.\n   * @param type StorageType that the space quota is intended to be set on.\n   * @throws IOException If the quota system is disabled.\n   */","sourceCodeStart":66,"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/Quota.java#L66-L102","documentation":"Quota.setQuota() refuses any setQuota operation when Router.isQuotaEnabled() is false, i.e. the config dfs.federation.router.quota.enable is unset or false (default is false). The Router-side quota system must be explicitly enabled because it requires extra state (RouterQuotaManager, quota cache) and periodic usage updates.","triggerScenarios":"Client executes hdfs dfsadmin -setQuota/-setSpaceQuota/-setStorageTypeQuota through the Router while dfs.federation.router.quota.enable=false; admin calls RouterAdminServer.synchronizeQuota paths; setQuota invoked with checkMountEntry=false on a Router built with default config.","commonSituations":"New RBF deployment where operators assume quotas work like a standalone NameNode; config file where quota.enable was set on the NameNode side instead of the Router (federation.xml/router config); typo in the key so the default false applies.","solutions":["Set dfs.federation.router.quota.enable=true in the Router's config (e.g. router.yaml/hdfs-site.xml on every Router) and restart the Router","Confirm the Router picked it up: JMX RBFMetrics or router log showing RouterQuotaManager startup","If quotas are intentionally disabled, stop calling setQuota through the Router and manage quota directly on the subclusters"],"exampleFix":"<!-- before: default, quota disabled -->\n<property>\n  <name>dfs.federation.router.quota.enable</name>\n  <value>false</value>\n</property>\n\n<!-- after -->\n<property>\n  <name>dfs.federation.router.quota.enable</name>\n  <value>true</value>\n</property>","handlingStrategy":"validation","validationCode":"// Before calling setQuota through the Router, verify the quota system is on\nboolean quotaEnabled = conf.getBoolean(\n    \"dfs.federation.router.quota.enable\", false);\nif (!quotaEnabled) {\n  throw new IllegalStateException(\n      \"Router quota disabled: set dfs.federation.router.quota.enable=true\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  routerQuota.setQuota(path, nsQuota, ssQuota, type, false);\n} catch (IOException e) {\n  if (\"The quota system is disabled in Router.\".equals(e.getMessage())) {\n    // config problem: enable quota.enable or route quota calls to subclusters directly\n  } else { throw e; }\n}","preventionTips":["Set dfs.federation.router.quota.enable=true deliberately in router config when federation quotas are needed","Deploy the same quota config to every Router behind a load balancer","Make quota automation probe the Router JMX quota state before issuing dfsadmin calls"],"tags":["hdfs","router-based-federation","quota","configuration"],"backgroundTag":"feature-disabled-by-config","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}