{"record":{"id":"7fbe7544e35091be","repo":"apache/hadoop","slug":"scheduler-s-refresh-queues-failed-with-the-excepti","errorCode":null,"errorMessage":"Scheduler's refresh-queues failed with the exception : \" + StringUtils.stringifyException(e) + \"\n\" + \"Scheduler couldn't refresh it's queues with the new configuration properties. Retaining existing configuration throughout the system.","messagePattern":"Scheduler's refresh-queues failed with the exception : \" \\+ StringUtils\\.stringifyException\\(e\\) \\+ \"\n\" \\+ \"Scheduler couldn't refresh it's queues with the new configuration properties\\. Retaining existing configuration throughout the system\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/QueueManager.java","lineNumber":371,"sourceCode":"      throw new IOException(MSG_REFRESH_FAILURE_WITH_CHANGE_OF_HIERARCHY);\n    }\n\n    /*\n     * (2) QueueManager owned properties are validated. Now validate and\n     * refresh the properties of scheduler in a single step.\n     */\n    if (schedulerRefresher != null) {\n      try {\n        schedulerRefresher.refreshQueues(cp.getRoot().getJobQueueInfo().getChildren());\n      } catch (Throwable e) {\n        StringBuilder msg =\n            new StringBuilder(\n                \"Scheduler's refresh-queues failed with the exception : \"\n                    + StringUtils.stringifyException(e));\n        msg.append(\"\\n\");\n        msg.append(MSG_REFRESH_FAILURE_WITH_SCHEDULER_FAILURE);\n        LOG.error(msg.toString());\n        throw new IOException(msg.toString());\n      }\n    }\n\n    /*\n     * (3) Scheduler has validated and refreshed its queues successfully, now\n     * refresh the properties owned by QueueManager\n     */\n\n    // First copy the scheduling information recursively into the new\n    // queue-hierarchy. This is done to retain old scheduling information. This\n    // is done after scheduler refresh and not before it because during refresh,\n    // schedulers may wish to change their scheduling info objects too.\n    cp.getRoot().copySchedulingInfo(this.root);\n\n    // Now switch roots.\n    initialize(cp);\n\n    LOG.info(\"Queue configuration is refreshed successfully.\");","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/QueueManager.java#L353-L389","documentation":"During refresh-queues, after QueueManager validates the hierarchy, it hands the new queue tree to the configured scheduler via schedulerRefresher.refreshQueues(). If the scheduler rejects the new properties (for example CapacityScheduler finds invalid capacities), the scheduler's exception is stringified into the message and rethrown as this IOException; the whole refresh is rolled back and existing configuration is kept everywhere.","triggerScenarios":"Refreshing queues with a capacity-scheduler.xml whose queue capacities do not sum to 100, a maximum-capacity below capacity, a queue missing from mapred-queues.xml, or malformed ACL strings in scheduler properties.","commonSituations":"Editing capacity-scheduler.xml without keeping queue names in sync with mapred-queues.xml; rounding capacity percentages so they total 99 or 101; adding a scheduler queue that the queue config does not define.","solutions":["Read the exception embedded in the message after 'failed with the exception :' — it names the exact scheduler problem.","Fix the reported scheduler property (make capacities sum to 100, align queue names with mapred-queues.xml, correct max-capacity values).","Re-run 'mr admin -refresh-queues' and confirm it returns cleanly.","If the message is truncated, check the JobTracker log where the full message is also logged at ERROR level."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// capacity-scheduler sanity check before refresh: capacities must sum to 100\nint total = 0;\nfor (Queue q : newQueues) total += q.getCapacity();\nif (total != 100) throw new IOException(\"Capacities sum to \" + total + \", expected 100\");","typeGuard":null,"tryCatchPattern":"try {\n  queueManager.refreshQueues(conf);\n} catch (IOException e) {\n  if (e.getMessage().contains(\"Scheduler's refresh-queues failed\")) {\n    // parse the embedded 'failed with the exception :' text; existing config is retained system-wide\n  }\n}","preventionTips":["Keep queue names in capacity-scheduler.xml and mapred-queues.xml in lockstep (generate both from one source).","Verify capacity percentages sum to exactly 100 before deploying.","Set maximum-capacity >= capacity on every queue."],"tags":["hadoop","mapreduce","capacity-scheduler","refresh","queues","config"],"backgroundTag":"scheduler-config-invalid","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}