apache/hadoop · error · IllegalArgumentException
No arguments allowed
Error message
No arguments allowed
What it means
Error "No arguments allowed" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java:250
}
} else if (arg[0].equals("-getDestination")) {
if (arg.length > 2) {
throw new IllegalArgumentException(
"Too many arguments, Max=1 argument allowed only");
}
} else if (arg[0].equals("-safemode")) {
if (arg.length > 2) {
throw new IllegalArgumentException(
"Too many arguments, Max=1 argument allowed only");
}
} else if (arg[0].equals("-nameservice")) {
if (arg.length > 3) {
throw new IllegalArgumentException(
"Too many arguments, Max=2 arguments allowed");
}
} else if (arg[0].equals("-getDisabledNameservices")) {
if (arg.length > 1) {
throw new IllegalArgumentException("No arguments allowed");
}
} else if (arg[0].equals("-refreshSuperUserGroupsConfiguration")) {
if (arg.length > 1) {
throw new IllegalArgumentException("No arguments allowed");
}
} else if (arg[0].equals("-refreshCallQueue") ||
arg[0].equals(DUMP_COMMAND)) {
if (arg.length > 1) {
throw new IllegalArgumentException("No arguments allowed");
}
}
}
/**
* Usage: validates the minimum number of arguments for a command.
* @param argv List of of command line parameters.
* @return true if number of arguments are valid for the command else false.
*/View on GitHub (pinned to 2add963021)
Solutions
- Run the subcommand without any positional arguments.
- Move options before the subcommand if they were mistaken for arguments.
When it happens
Trigger: RouterAdmin argument parsing: arguments supplied to a subcommand that accepts none.
Common situations: User appended a path or flag to a no-argument dfsrouteradmin command such as a list/refresh variant.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/a27020da60c4cbe2.
Report an issue: GitHub.