static int mainNoExit(String... args) {
        try {
            execute(args, System.out);
            return 0;
        } catch (Exception e) {
            System.err.println(e.getMessage());
            System.err.println(Utils.stackTrace(e));
            return 1;
        }
    }
A command for delete records of the given partitions down to the specified offset.
tools/src/main/java/org/apache/kafka/tools/DeleteRecordsCommand.java