{"record":{"id":"b36f72c49372ae8f","repo":"apache/hadoop","slug":"feature-s-unsupported-at-namenode-layout-version","errorCode":null,"errorMessage":"Feature %s unsupported at NameNode layout version %d.  If a rolling upgrade is in progress, then it must be finalized before using this feature.","messagePattern":"Feature (.+?) unsupported at NameNode layout version (.+?)\\.  If a rolling upgrade is in progress, then it must be finalized before using this feature\\.","errorType":"exception","errorClass":"HadoopIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java","lineNumber":7832,"sourceCode":"  /**\n   * Performs a pre-condition check that the layout version in effect is\n   * sufficient to support the requested {@link Feature}.  If not, then the\n   * method throws {@link HadoopIllegalArgumentException} to deny the operation.\n   * This exception class is registered as a terse exception, so it prevents\n   * verbose stack traces in the NameNode log.  During a rolling upgrade, this\n   * method is used to restrict usage of new features.  This prevents writing\n   * new edit log operations that would be unreadable by the old software\n   * version if the admin chooses to downgrade.\n   *\n   * @param f feature to check\n   * @throws HadoopIllegalArgumentException if the current layout version in\n   *     effect is insufficient to support the feature\n   */\n  private void requireEffectiveLayoutVersionForFeature(Feature f)\n      throws HadoopIllegalArgumentException {\n    int lv = getEffectiveLayoutVersion();\n    if (!NameNodeLayoutVersion.supports(f, lv)) {\n      throw new HadoopIllegalArgumentException(String.format(\n          \"Feature %s unsupported at NameNode layout version %d.  If a \" +\n          \"rolling upgrade is in progress, then it must be finalized before \" +\n          \"using this feature.\", f, lv));\n    }\n  }\n\n  void checkRollingUpgrade(String action) throws RollingUpgradeException {\n    if (isRollingUpgrade()) {\n      throw new RollingUpgradeException(\"Failed to \" + action\n          + \" since a rolling upgrade is already in progress.\"\n          + \" Existing rolling upgrade info:\\n\" + rollingUpgradeInfo);\n    }\n  }\n\n  RollingUpgradeInfo finalizeRollingUpgrade() throws IOException {\n    final String operationName = \"finalizeRollingUpgrade\";\n    checkSuperuserPrivilege(operationName);\n    checkOperation(OperationCategory.WRITE);","sourceCodeStart":7814,"sourceCodeEnd":7850,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java#L7814-L7850","documentation":"Error \"Feature %s unsupported at NameNode layout version %d.  If a rolling upgrade is in progress, then it must be finalized before using this feature.\" thrown in apache/hadoop.","triggerScenarios":"A feature requiring a newer layout version is invoked while the NameNode layout is older, typically during a rolling upgrade.","commonSituations":"Using a new HDFS feature (e.g., EC, new snapshot ops) before finalizing an in-progress rolling upgrade.","solutions":["Finalize the rolling upgrade with 'hdfs dfsadmin -rollingUpgrade finalize' before using the feature, or use a NameNode version whose layout supports it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}