{"record":{"id":"a27020da60c4cbe2","repo":"apache/hadoop","slug":"no-arguments-allowed","errorCode":null,"errorMessage":"No arguments allowed","messagePattern":"No arguments allowed","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java","lineNumber":250,"sourceCode":"      }\n    } else if (arg[0].equals(\"-getDestination\")) {\n      if (arg.length > 2) {\n        throw new IllegalArgumentException(\n            \"Too many arguments, Max=1 argument allowed only\");\n      }\n    } else if (arg[0].equals(\"-safemode\")) {\n      if (arg.length > 2) {\n        throw new IllegalArgumentException(\n            \"Too many arguments, Max=1 argument allowed only\");\n      }\n    } else if (arg[0].equals(\"-nameservice\")) {\n      if (arg.length > 3) {\n        throw new IllegalArgumentException(\n            \"Too many arguments, Max=2 arguments allowed\");\n      }\n    } else if (arg[0].equals(\"-getDisabledNameservices\")) {\n      if (arg.length > 1) {\n        throw new IllegalArgumentException(\"No arguments allowed\");\n      }\n    } else if (arg[0].equals(\"-refreshSuperUserGroupsConfiguration\")) {\n      if (arg.length > 1) {\n        throw new IllegalArgumentException(\"No arguments allowed\");\n      }\n    } else if (arg[0].equals(\"-refreshCallQueue\") ||\n        arg[0].equals(DUMP_COMMAND)) {\n      if (arg.length > 1) {\n        throw new IllegalArgumentException(\"No arguments allowed\");\n      }\n    }\n  }\n\n  /**\n   * Usage: validates the minimum number of arguments for a command.\n   * @param argv List of of command line parameters.\n   * @return true if number of arguments are valid for the command else false.\n   */","sourceCodeStart":232,"sourceCodeEnd":268,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java#L232-L268","documentation":"Error \"No arguments allowed\" thrown in apache/hadoop.","triggerScenarios":"RouterAdmin argument parsing: arguments supplied to a subcommand that accepts none.","commonSituations":"User appended a path or flag to a no-argument dfsrouteradmin command such as a list/refresh variant.","solutions":["Run the subcommand without any positional arguments.","Move options before the subcommand if they were mistaken for arguments."],"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"}