{"record":{"id":"3043dcfd616d642d","repo":"apache/hadoop","slug":"bandwidth-is-negative-please-check","errorCode":null,"errorMessage":"bandwidth={} is negative. Please check {}","messagePattern":"bandwidth=(.+?) is negative\\. Please check (.+?)","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/RouterFederationRename.java","lineNumber":276,"sourceCode":"    routerRenameCounter.incrementAndGet();\n  }\n\n  void countDecrement() {\n    routerRenameCounter.decrementAndGet();\n  }\n\n  static void checkConfiguration(Configuration conf) throws IOException {\n    int map = conf.getInt(DFS_ROUTER_FEDERATION_RENAME_MAP, -1);\n    int bandwidth = conf.getInt(DFS_ROUTER_FEDERATION_RENAME_BANDWIDTH, -1);\n    long delay = conf.getLong(DFS_ROUTER_FEDERATION_RENAME_DELAY,\n        DFS_ROUTER_FEDERATION_RENAME_DELAY_DEFAULT);\n    int diff = conf.getInt(DFS_ROUTER_FEDERATION_RENAME_DIFF,\n        DFS_ROUTER_FEDERATION_RENAME_DIFF_DEFAULT);\n    if (map < 0) {\n      throw new IOException(\"map=\" + map + \" is negative. Please check \"\n          + DFS_ROUTER_FEDERATION_RENAME_MAP);\n    } else if (bandwidth < 0) {\n      throw new IOException(\n          \"bandwidth=\" + bandwidth + \" is negative. Please check \"\n              + DFS_ROUTER_FEDERATION_RENAME_BANDWIDTH);\n    } else if (delay < 0) {\n      throw new IOException(\"delay=\" + delay + \" is negative. Please check \"\n          + DFS_ROUTER_FEDERATION_RENAME_DELAY);\n    } else if (diff < 0) {\n      throw new IOException(\"diff=\" + diff + \" is negative. Please check \"\n          + DFS_ROUTER_FEDERATION_RENAME_DIFF);\n    }\n  }\n}\n","sourceCodeStart":258,"sourceCodeEnd":288,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterFederationRename.java#L258-L288","documentation":"checkConfiguration validates the fed-rename distcp bandwidth limit read from dfs.federation.router.federation.rename.bandwidth with default -1. If the key is unset or negative, the router throws this IOException before building the rename job; 'bandwidth' caps per-mapper copy bandwidth (MB/s) for the underlying distcp.","triggerScenarios":"Cross-namespace rename with dfs.federation.router.federation.rename.bandwidth missing from the router configuration (getInt default -1) or explicitly set to a negative number.","commonSituations":"Partial fed-rename configuration (option and map set, bandwidth forgotten); copying configs between clusters where the bandwidth key was dropped; deliberate '0 means unlimited' confusion - 0 is accepted but negative is not.","solutions":["Set dfs.federation.router.federation.rename.bandwidth to a non-negative value (positive MB/s limit; 0 = unlimited) in the router config","Verify the exact key spelling: dfs.federation.router.federation.rename.bandwidth","Configure map/bandwidth/delay/diff together when enabling fed rename and restart the router"],"exampleFix":"# before\n<property><name>dfs.federation.router.federation.rename.bandwidth</name><value>-1</value></property>\n# after\n<property><name>dfs.federation.router.federation.rename.bandwidth</name><value>100</value></property>","handlingStrategy":"validation","validationCode":"int bandwidth = conf.getInt(\"dfs.federation.router.federation.rename.bandwidth\", -1);\nif (bandwidth < 0) {\n  throw new IllegalStateException(\n      \"dfs.federation.router.federation.rename.bandwidth must be non-negative (0 = unlimited)\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  routerFedRename.routerFedRename(src, dst, srcLocs, dstLocs);\n} catch (IOException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"dfs.federation.router.federation.rename.bandwidth\")) {\n    // set the bandwidth key named in the message, restart router, retry\n  }\n  throw e;\n}","preventionTips":["Ship a complete fed-rename config block (option, map, bandwidth) as one unit","Use 0 for unlimited bandwidth instead of -1 placeholders","Diff router configs across the fleet after changes to catch dropped keys"],"tags":["hdfs","router","federation","rename","configuration","bandwidth"],"backgroundTag":"invalid-configuration-value","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}