apache/hadoop · error · IllegalArgumentException
Illegal arguments list!
Error message
Illegal arguments list!
What it means
IllegalArgumentException('Illegal arguments list!') from Anonymizer's arg loop: ANY exception while scanning args (most commonly ArrayIndexOutOfBoundsException from '-trace' or '-topology' not being followed by two paths, NumberFormatException, or a bad Path) is caught and rethrown with this generic message and the original cause attached.
Source
Thrown at hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/Anonymizer.java:77
private void initialize(String[] args) throws Exception {
try {
for (int i = 0; i < args.length; ++i) {
if ("-trace".equals(args[i])) {
anonymizeTrace = true;
inputTracePath = new Path(args[i+1]);
outputTracePath = new Path(args[i+2]);
i +=2;
}
if ("-topology".equals(args[i])) {
anonymizeTopology = true;
inputTopologyPath = new Path(args[i+1]);
outputTopologyPath = new Path(args[i+2]);
i +=2;
}
}
} catch (Exception e) {
throw new IllegalArgumentException("Illegal arguments list!", e);
}
if (!anonymizeTopology && !anonymizeTrace) {
throw new IllegalArgumentException("Invalid arguments list!");
}
statePool = new StatePool();
// initialize the state manager after the anonymizers are registered
statePool.initialize(getConf());
outMapper = new ObjectMapper();
// define a module
SimpleModule module = new SimpleModule(
"Anonymization Serializer", new Version(0, 1, 1, "FINAL", "", ""));
// add various serializers to the module
// use the default (as-is) serializer for default data types
module.addSerializer(DataType.class, new DefaultRumenSerializer());
// use a blocking serializer for Strings as they can contain sensitive View on GitHub (pinned to 2add963021)
Solutions
- Call getCause() on the exception (or log the full stack) — the chained cause shows the real failure such as ArrayIndexOutOfBoundsException
- Fix the command to the exact form: -trace <inputTrace> <outputTrace> and/or -topology <inputTopology> <outputTopology>, each flag followed by exactly two paths
- Verify both paths are valid, resolvable URIs (file:/ or hdfs:/ prefixes)
- Add argument validation in your launcher script before invoking the tool
Example fix
# before (missing output trace path) hadoop jar rumen.jar org.apache.hadoop.tools.rumen.Anonymizer -trace /in/trace.json # after (input and output path pair) hadoop jar rumen.jar org.apache.hadoop.tools.rumen.Anonymizer -trace /in/trace.json /out/trace-anon.json
Defensive patterns
Strategy: validation
Validate before calling
boolean validAnonymizerArgs(String[] a) {
for (int i = 0; i < a.length; i++) {
if ("-trace".equals(a[i]) || "-topology".equals(a[i])) {
if (i + 2 >= a.length) return false; // needs two paths
// optionally: verify a[i+1], a[i+2] parse as URIs
}
}
return true;
} Try / catch
try {
anonymizer.run(args);
} catch (IllegalArgumentException e) {
Throwable cause = e.getCause(); // real reason: AIOOBE, bad Path, etc.
System.err.println("Bad Anonymizer args: " + cause);
} Prevention
- Always give each of -trace/-topology exactly two path arguments
- Validate assembled command lines in scripts before execution
- Log the full stack, not just the message, to see the chained cause
When it happens
Trigger: Running the rumen Anonymizer with 'hadoop ... Anonymizer -trace' (missing input/output trace paths), '-topology' with fewer than two following path args, or any arg order that makes args[i+1]/args[i+2] fall off the array; also malformed URI paths that make new Path() throw.
Common situations: Shell scripts that drop quoted empty args; copy-paste command lines from docs of a different version; users assuming '-trace' takes one file instead of input+output pairs.
Related errors
- Invalid arguments list!
- Can not open a folder
- Failed to rename %s to %s, %s is a file
- Failed to rename %s to %s, file already exists or not empty!
- Truncate is not supported by BaiduBosFileSystem
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/32f3290321478636.
Report an issue: GitHub.