{"record":{"id":"9a466ef9293c9498","repo":"apache/hadoop","slug":"invalid-arguments-list","errorCode":null,"errorMessage":"Invalid arguments list!","messagePattern":"Invalid arguments list!","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/Anonymizer.java","lineNumber":81,"sourceCode":"        if (\"-trace\".equals(args[i])) {\n          anonymizeTrace = true;\n          inputTracePath = new Path(args[i+1]);\n          outputTracePath = new Path(args[i+2]);\n          i +=2;\n        }\n        if (\"-topology\".equals(args[i])) {\n          anonymizeTopology = true;\n          inputTopologyPath = new Path(args[i+1]);\n          outputTopologyPath = new Path(args[i+2]);\n          i +=2;\n        }\n      }\n    } catch (Exception e) {\n      throw new IllegalArgumentException(\"Illegal arguments list!\", e);\n    }\n    \n    if (!anonymizeTopology && !anonymizeTrace) {\n      throw new IllegalArgumentException(\"Invalid arguments list!\");\n    }\n    \n    statePool = new StatePool();\n    // initialize the state manager after the anonymizers are registered\n    statePool.initialize(getConf());\n     \n    outMapper = new ObjectMapper();\n    // define a module\n    SimpleModule module = new SimpleModule(\n        \"Anonymization Serializer\", new Version(0, 1, 1, \"FINAL\", \"\", \"\"));\n    // add various serializers to the module\n    // use the default (as-is) serializer for default data types\n    module.addSerializer(DataType.class, new DefaultRumenSerializer());\n    // use a blocking serializer for Strings as they can contain sensitive \n    // information\n    module.addSerializer(String.class, new BlockingSerializer());\n    // use object.toString() for object of type ID\n    module.addSerializer(ID.class, new ObjectStringSerializer<ID>());","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/Anonymizer.java#L63-L99","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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"],"exampleFix":"# before (no mode flag -> Invalid arguments list!)\nhadoop jar rumen.jar org.apache.hadoop.tools.rumen.Anonymizer\n\n# after\nhadoop jar rumen.jar org.apache.hadoop.tools.rumen.Anonymizer -topology /in/topo.json /out/topo-anon.json","handlingStrategy":"validation","validationCode":"boolean hasMode(String[] a) {\n  for (String s : a) {\n    if (\"-trace\".equals(s) || \"-topology\".equals(s)) return true;\n  }\n  return false;\n}\nif (!hasMode(args)) throw new RuntimeException(\"need -trace or -topology\");","typeGuard":null,"tryCatchPattern":"try {\n  anonymizer.run(args);\n} catch (IllegalArgumentException e) {\n  if (e.getMessage().contains(\"Invalid\")) printUsage();\n  else throw e;\n}","preventionTips":["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"],"tags":["hadoop","rumen","anonymizer","cli-args","argument-parsing"],"backgroundTag":"invalid-command-line-arguments","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}