apache/hadoop · error · IllegalArgumentException
Invalid argument: {}. Please specify either true or false.
Error message
Invalid argument: {}. Please specify either true or false. What it means
Error "Invalid argument: {}. Please specify either true or false." thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java:837
if (!updated) {
System.err.println("Cannot update mount point " + mount);
}
return updated;
}
/**
* Parse string to boolean.
* @param value the string to be parsed.
* @return parsed boolean value.
* @throws Exception if other than true|false is provided.
*/
private boolean getBooleanValue(String value) throws Exception {
if (value.equalsIgnoreCase("true")) {
return true;
} else if (value.equalsIgnoreCase("false")) {
return false;
}
throw new IllegalArgumentException("Invalid argument: " + value
+ ". Please specify either true or false.");
}
/**
* Gets the mount table entry.
* @param mount name of the mount entry.
* @param mountTable the mount table.
* @return corresponding mount entry.
* @throws IOException in case of failure to retrieve mount entry.
*/
private MountTable getMountEntry(String mount, MountTableManager mountTable)
throws IOException {
GetMountTableEntriesRequest getRequest =
GetMountTableEntriesRequest.newInstance(mount);
GetMountTableEntriesResponse getResponse =
mountTable.getMountTableEntries(getRequest);
List<MountTable> results = getResponse.getEntries();
MountTable existingEntry = null;View on GitHub (pinned to 2add963021)
Solutions
- Pass exactly 'true' or 'false' for this boolean argument.
- Check the option's expected value type in -help output.
When it happens
Trigger: RouterAdmin boolean argument parsing received a value other than true/false.
Common situations: User passed yes/no, 1/0, or an empty value for a readonly/readonly-style boolean flag.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/262b5caf9f30edcd.
Report an issue: GitHub.