{"record":{"id":"fd13bfae8df29b89","repo":"apache/hadoop","slug":"snapshot-is-a-reserved-name","errorCode":null,"errorMessage":"\".snapshot\" is a reserved name.","messagePattern":"\"\\.snapshot\" is a reserved name\\.","errorType":"exception","errorClass":"HadoopIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java","lineNumber":1265,"sourceCode":"      if (q != null) { // a directory with quota\n        try {\n          q.verifyQuota(deltas);\n        } catch (QuotaExceededException e) {\n          e.setPathName(iip.getPath(i));\n          throw e;\n        }\n      }\n    }\n  }\n\n  /** Verify if the inode name is legal. */\n  void verifyINodeName(byte[] childName) throws HadoopIllegalArgumentException {\n    if (Arrays.equals(HdfsServerConstants.DOT_SNAPSHOT_DIR_BYTES, childName)) {\n      String s = \"\\\"\" + HdfsConstants.DOT_SNAPSHOT_DIR + \"\\\" is a reserved name.\";\n      if (!namesystem.isImageLoaded()) {\n        s += \"  Please rename it before upgrade.\";\n      }\n      throw new HadoopIllegalArgumentException(s);\n    }\n  }\n\n  /**\n   * Verify child's name for fs limit.\n   *\n   * @param childName byte[] containing new child name\n   * @param parentPath String containing parent path\n   * @throws PathComponentTooLongException child's name is too long.\n   */\n  void verifyMaxComponentLength(byte[] childName, String parentPath)\n      throws PathComponentTooLongException {\n    if (maxComponentLength == 0) {\n      return;\n    }\n\n    final int length = childName.length;\n    if (length > maxComponentLength) {","sourceCodeStart":1247,"sourceCodeEnd":1283,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java#L1247-L1283","documentation":"Error \"\".snapshot\" is a reserved name.\" thrown in apache/hadoop.","triggerScenarios":"Creating a file or directory named '.snapshot', which is reserved by HDFS for snapshot access.","commonSituations":"See trigger scenarios.","solutions":["'.snapshot' is reserved for the snapshot mechanism; choose a different name for the file or directory."],"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"}