code: private static void printUsage(String cmd) {
      String prefix = "Usage: java " + FairSchedulerShell.class.getSimpleName();
      if ("-getfsmaxslots".equalsIgnoreCase(cmd)) {
        System.err.println(prefix + " [-getfsmaxslots trackerName1, trackerName2 ... ]");
      } else if ("-setfsmaxslots".equalsIgnoreCase(cmd)) {
        System.err.println(prefix + " [-setfsmaxslots trackerName #maps #reduces trackerName2 #maps #reduces ... ]");
      } else {
        System.err.println(prefix);
        System.err.println("          [-setfsmaxslots trackerName #maps #reduces trackerName2 #maps #reduces ... ]");
        System.err.println("          [-getfsmaxslots trackerName1, trackerName2 ... ]");
        System.err.println("          [-resetfsmaxslots]");
        System.err.println("          [-help [cmd]]");
        System.err.println();
        ToolRunner.printGenericCommandUsage(System.err);
      }
    }
docs: Displays format of commands.