{"record":{"id":"f8a9357a101d95da","repo":"apache/hadoop","slug":"unknown-command-f8a935","errorCode":null,"errorMessage":"Unknown Command: {}","messagePattern":"Unknown Command: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java","lineNumber":451,"sourceCode":"        manageNameservice(subcmd, nsId);\n      } else if (\"-getDisabledNameservices\".equals(cmd)) {\n        getDisabledNameservices();\n      } else if (\"-refresh\".equals(cmd)) {\n        refresh(address);\n      } else if (\"-refreshRouterArgs\".equals(cmd)) {\n        exitCode = genericRefresh(argv, i);\n      } else if (\"-refreshSuperUserGroupsConfiguration\".equals(cmd)) {\n        exitCode = refreshSuperUserGroupsConfiguration();\n      } else if (\"-refreshCallQueue\".equals(cmd)) {\n        exitCode = refreshCallQueue();\n      } else if (ADD_ALL_COMMAND.equals(cmd)) {\n        if (addAllMount(argv, i)) {\n          System.out.println(\"Successfully added all mount points \");\n        } else {\n          exitCode = -1;\n        }\n      } else {\n        throw new IllegalArgumentException(\"Unknown Command: \" + cmd);\n      }\n    } catch (IllegalArgumentException arge) {\n      debugException = arge;\n      exitCode = -1;\n      System.err.println(cmd.substring(1) + \": \" + arge.getLocalizedMessage());\n      printUsage(cmd);\n    } catch (RemoteException e) {\n      // This is an error returned by the server.\n      // Print out the first line of the error message, ignore the stack trace.\n      exitCode = -1;\n      debugException = e;\n      try {\n        String[] content;\n        content = e.getLocalizedMessage().split(\"\\n\");\n        System.err.println(cmd.substring(1) + \": \" + content[0]);\n        e.printStackTrace();\n      } catch (Exception ex) {\n        System.err.println(cmd.substring(1) + \": \" + ex.getLocalizedMessage());","sourceCodeStart":433,"sourceCodeEnd":469,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/tools/federation/RouterAdmin.java#L433-L469","documentation":"Error \"Unknown Command: {}\" thrown in apache/hadoop.","triggerScenarios":"RouterAdmin received a command token it does not recognize.","commonSituations":"Typo in the dfsrouteradmin subcommand or use of a command from a different tool (e.g. hdfs dfsadmin syntax).","solutions":["Check the command name against dfsrouteradmin -usage / -help output.","Fix spelling of the subcommand (e.g. -add, -rm, -ls, -setQuota)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}