{"record":{"id":"a4e7736fc13c4ad5","repo":"apache/hadoop","slug":"both-owner-and-group-are-empty","errorCode":null,"errorMessage":"Both owner and group are empty.","messagePattern":"Both owner and group are empty\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":400,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java","lineNumber":847,"sourceCode":"        final boolean b = cp.rename(fullpath, destination.getValue());\n        final String js = JsonUtil.toJsonString(\"boolean\", b);\n        return Response.ok(js).type(MediaType.APPLICATION_JSON).build();\n      } else {\n        cp.rename2(fullpath, destination.getValue(),\n            s.toArray(new Options.Rename[s.size()]));\n        return Response.ok().type(MediaType.APPLICATION_OCTET_STREAM).build();\n      }\n    }\n    case SETREPLICATION:\n    {\n      final boolean b = cp.setReplication(fullpath, replication.getValue(conf));\n      final String js = JsonUtil.toJsonString(\"boolean\", b);\n      return Response.ok(js).type(MediaType.APPLICATION_JSON).build();\n    }\n    case SETOWNER:\n    {\n      if (owner.getValue() == null && group.getValue() == null) {\n        throw new IllegalArgumentException(\"Both owner and group are empty.\");\n      }\n\n      cp.setOwner(fullpath, owner.getValue(), group.getValue());\n      return Response.ok().type(MediaType.APPLICATION_OCTET_STREAM).build();\n    }\n    case SETPERMISSION:\n    {\n      cp.setPermission(fullpath, permission.getDirFsPermission());\n      return Response.ok().type(MediaType.APPLICATION_OCTET_STREAM).build();\n    }\n    case SETTIMES:\n    {\n      cp.setTimes(fullpath, modificationTime.getValue(), accessTime.getValue());\n      return Response.ok().type(MediaType.APPLICATION_OCTET_STREAM).build();\n    }\n    case RENEWDELEGATIONTOKEN:\n    {\n      validateOpParams(op, delegationTokenArgument);","sourceCodeStart":829,"sourceCodeEnd":865,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java#L829-L865","documentation":"Error \"Both owner and group are empty.\" thrown in apache/hadoop.","triggerScenarios":"Thrown by the WebHDFS SETOWNER op when both the owner and group parameters are omitted; at least one must be supplied.","commonSituations":"See trigger scenarios.","solutions":["Pass at least one of the 'owner' or 'group' parameters to the SETOWNER WebHDFS operation."],"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-23T01:17:44.959Z"}