apache/hadoop · error · IllegalArgumentException
Invalid arguments list!
Error message
Invalid arguments list!
What it means
IllegalArgumentException('Invalid arguments list!') thrown by Anonymizer after successful parsing when neither -trace nor -topology was seen (anonymizeTopology and anonymizeTrace both false). Unlike the 'Illegal arguments list!' case, parsing itself succeeded — the tool just has no work to do and refuses to run.
Source
Thrown at hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/Anonymizer.java:81
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
// information
module.addSerializer(String.class, new BlockingSerializer());
// use object.toString() for object of type ID
module.addSerializer(ID.class, new ObjectStringSerializer<ID>());View on GitHub (pinned to 2add963021)
Solutions
- Include at least one of '-trace <in> <out>' or '-topology <in> <out>' in the command
- Check flag spelling and case — the equals checks are exact ('-trace', '-topology')
- If flags come from a variable in a script, echo the assembled command to verify they were passed
- Remember each flag consumes the two following arguments; a missing pair can instead trigger the sibling 'Illegal arguments list!' error
Example fix
# before (no mode flag -> Invalid arguments list!) hadoop jar rumen.jar org.apache.hadoop.tools.rumen.Anonymizer # after hadoop jar rumen.jar org.apache.hadoop.tools.rumen.Anonymizer -topology /in/topo.json /out/topo-anon.json
Defensive patterns
Strategy: validation
Validate before calling
boolean hasMode(String[] a) {
for (String s : a) {
if ("-trace".equals(s) || "-topology".equals(s)) return true;
}
return false;
}
if (!hasMode(args)) throw new RuntimeException("need -trace or -topology"); Try / catch
try {
anonymizer.run(args);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("Invalid")) printUsage();
else throw e;
} Prevention
- Spell flags lowercase and exactly: -trace, -topology
- Echo the final command from launch scripts to catch dropped flags
- Remember at least one mode flag is mandatory
When it happens
Trigger: Invoking the Anonymizer with only JVM/config options or misspelled flags ('-trac', '-Topology') so that neither anonymizeTrace nor anonymizeTopology is ever set; note the flags are case-sensitive ('-trace' lowercase).
Common situations: Misspelled or capitalized flags (e.g. '-TRACE'); scripts passing flags through an env variable that expands empty; running the jar with only a config path and expecting GUI behavior.
Related errors
- Illegal 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/9a466ef9293c9498.
Report an issue: GitHub.