{"record":{"id":"f5f66f98aa845b8c","repo":"apache/hadoop","slug":"could-not-change-property-property-from-oldv","errorCode":null,"errorMessage":"Could not change property ${property} from '${oldVal}' to '${newVal}'","messagePattern":"Could not change property (.+?) from '(.+?)' to '(.+?)'","errorType":"exception","errorClass":"ReconfigurationException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ReconfigurableBase.java","lineNumber":238,"sourceCode":"   * This method cannot be overridden, subclasses should instead override\n   * reconfigurePropertyImpl.\n   */\n  @Override\n  public final void reconfigureProperty(String property, String newVal)\n    throws ReconfigurationException {\n    if (isPropertyReconfigurable(property)) {\n      LOG.info(\"changing property \" + property + \" to \" + newVal);\n      synchronized(getConf()) {\n        getConf().get(property);\n        String effectiveValue = reconfigurePropertyImpl(property, newVal);\n        if (newVal != null) {\n          getConf().set(property, effectiveValue);\n        } else {\n          getConf().unset(property);\n        }\n      }\n    } else {\n      throw new ReconfigurationException(property, newVal,\n                                             getConf().get(property));\n    }\n  }\n\n  /**\n   * {@inheritDoc}\n   *\n   * Subclasses must override this.\n   */\n  @Override \n  public abstract Collection<String> getReconfigurableProperties();\n\n\n  /**\n   * {@inheritDoc}\n   *\n   * Subclasses may wish to override this with a more efficient implementation.\n   */","sourceCodeStart":220,"sourceCodeEnd":256,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/ReconfigurableBase.java#L220-L256","documentation":"ReconfigurableBase.reconfigureProperty() only applies properties the service whitelisted: isPropertyReconfigurable() (backed by getReconfigurableProperties()) must return true. Any other property takes the else branch and throws ReconfigurationException, whose message is built by constructMessage() as \"Could not change property X from 'old' to 'new'\" (parts omitted when values are null). Service subclasses can also raise it from reconfigurePropertyImpl() when applying the new value fails.","triggerScenarios":"Calling reconfigureProperty(name, value) for a key not present in the service's getReconfigurableProperties() collection; attempting to unset (newVal null) a non-reconfigurable property; a subclass's reconfigurePropertyImpl rejecting the new value at apply time.","commonSituations":"Trying to hot-reload a restart-only setting (ports, hostnames, handler counts not on the whitelist); typo'd property name so it never matches the whitelist; assuming a key is reloadable merely because it exists in the XML config of a running daemon.","solutions":["Check svc.isPropertyReconfigurable(name) (or inspect getReconfigurableProperties()) before requesting the change and log/skip otherwise","Fix the property-name typo so it matches the exact whitelisted key","If the property is restart-only, apply the new value and restart the service instead of hot-reloading","If you own the service subclass, add the key to getReconfigurableProperties() and implement a safe reconfigurePropertyImpl()"],"exampleFix":"// before\nsvc.reconfigureProperty(\"dfs.datanode.max.transfer.threads\", \"8192\");\n// throws ReconfigurationException if not whitelisted\n\n// after\nString prop = \"dfs.datanode.max.transfer.threads\";\nif (svc.isPropertyReconfigurable(prop)) {\n  svc.reconfigureProperty(prop, \"8192\");\n} else {\n  LOG.warn(\"{} is not hot-reconfigurable; restart required\", prop);\n}","handlingStrategy":"validation","validationCode":"if (svc.isPropertyReconfigurable(propName)) {\n  svc.reconfigureProperty(propName, newVal);\n} else {\n  LOG.warn(\"{} is restart-only; schedule a service restart\", propName);\n}","typeGuard":null,"tryCatchPattern":"try {\n  svc.reconfigureProperty(prop, newVal);\n} catch (ReconfigurationException e) {\n  // e.getProperty()/getNewValue()/getOldValue() identify the failing change\n  LOG.warn(\"Hot-reload rejected for {} (old={}, new={}); restart required\",\n      e.getProperty(), e.getOldValue(), e.getNewValue());\n}","preventionTips":["Keep a per-service list of hot-reconfigurable keys and validate requests against it","Watch the daemon's ReconfigurationTask status/logs after each apply to catch per-property failures","For restart-only keys, automate restart rather than attempting hot-reload"],"tags":["reconfiguration","configuration","hadoop"],"backgroundTag":"config-reload-rejected","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}