public static void checkRequiredArgs(OptionParser parser, OptionSet options, OptionSpec<?>... requiredList) {
        for (OptionSpec<?> arg : requiredList) {
            if (!options.has(arg)) {
                printUsageAndExit(parser, String.format("Missing required argument \"%s\"", arg));
            }
        }
    }
Check that all the listed options are present.
server-common/src/main/java/org/apache/kafka/server/util/CommandLineUtils.java