Examples of OptionParser


Examples of joptsimple.OptionParser

         * Initializes parser
         *
         * @return OptionParser object with all available options
         */
        protected static OptionParser getParser() {
            OptionParser parser = new OptionParser();
            // help options
            AdminParserUtils.acceptsHelp(parser);
            // required options
            AdminParserUtils.acceptsDir(parser);
            AdminParserUtils.acceptsNodeSingle(parser);
View Full Code Here

Examples of joptsimple.OptionParser

         *
         */
        @SuppressWarnings("unchecked")
        public static void executeCommand(String[] args) throws Exception {

            OptionParser parser = getParser();

            // declare parameters
            String dir = null;
            Integer nodeId = null;
            String url = null;
            List<String> storeNames = null;
            Boolean confirm = false;

            // parse command-line input
            OptionSet options = parser.parse(args);
            if(options.has(AdminParserUtils.OPT_HELP)) {
                printHelp(System.out);
                return;
            }

View Full Code Here

Examples of joptsimple.OptionParser

         * Initializes parser
         *
         * @return OptionParser object with all available options
         */
        protected static OptionParser getParser() {
            OptionParser parser = new OptionParser();
            // help options
            AdminParserUtils.acceptsHelp(parser);
            // required options
            AdminParserUtils.acceptsUrl(parser);
            return parser;
View Full Code Here

Examples of joptsimple.OptionParser

         * @throws IOException
         *
         */
        public static void executeCommand(String[] args) throws IOException {

            OptionParser parser = getParser();

            // declare parameters
            String url = null;

            // parse command-line input
            OptionSet options = parser.parse(args);
            if(options.has(AdminParserUtils.OPT_HELP)) {
                printHelp(System.out);
                return;
            }

View Full Code Here

Examples of joptsimple.OptionParser

         * Initializes parser
         *
         * @return OptionParser object with all available options
         */
        protected static OptionParser getParser() {
            OptionParser parser = new OptionParser();
            // help options
            AdminParserUtils.acceptsHelp(parser);
            // required options
            AdminParserUtils.acceptsDir(parser);
            AdminParserUtils.acceptsNodeSingle(parser);
            AdminParserUtils.acceptsStoreSingle(parser);
            AdminParserUtils.acceptsUrl(parser);
            // optional options
            parser.accepts(OPT_TIMEOUT, "native-backup timeout in minute, defaults to 30")
                  .withRequiredArg()
                  .describedAs("time-minute")
                  .ofType(Integer.class);
            AdminParserUtils.acceptsConfirm(parser);
            parser.accepts(OPT_INCREMENTAL, "incremental native-backup for point-in-time recovery");
            parser.accepts(OPT_VERIFY, "native-backup verify checksum");
            return parser;
        }
View Full Code Here

Examples of joptsimple.OptionParser

         * @param args Command-line input
         * @throws IOException
         */
        public static void executeCommand(String[] args) throws IOException {

            OptionParser parser = getParser();

            // declare parameters
            String dir = null;
            Integer nodeId = null;
            String storeName = null;
            String url = null;
            Integer timeout = 30;
            Boolean confirm = false;
            Boolean incremental = false;
            Boolean verify = false;

            // parse command-line input
            OptionSet options = parser.parse(args);
            if(options.has(AdminParserUtils.OPT_HELP)) {
                printHelp(System.out);
                return;
            }

View Full Code Here

Examples of joptsimple.OptionParser

         * Initializes parser
         *
         * @return OptionParser object with all available options
         */
        protected static OptionParser getParser() {
            OptionParser parser = new OptionParser();
            // help options
            AdminParserUtils.acceptsHelp(parser);
            // required options
            AdminParserUtils.acceptsNodeSingle(parser);
            AdminParserUtils.acceptsUrl(parser);
            AdminParserUtils.acceptsZone(parser);
            // optional options
            parser.accepts(OPT_PARALLEL,
                           "parallism parameter for restore-from-replica, defaults to 5")
                  .withRequiredArg()
                  .describedAs("num")
                  .ofType(Integer.class);
            AdminParserUtils.acceptsConfirm(parser);
View Full Code Here

Examples of joptsimple.OptionParser

         * @param args Command-line input
         * @throws IOException
         */
        public static void executeCommand(String[] args) throws IOException {

            OptionParser parser = getParser();

            // declare parameters
            Integer nodeId = null;
            String url = null;
            Integer zoneId = null;
            Integer parallel = 5;
            Boolean confirm = false;

            // parse command-line input
            OptionSet options = parser.parse(args);
            if(options.has(AdminParserUtils.OPT_HELP)) {
                printHelp(System.out);
                return;
            }

View Full Code Here

Examples of joptsimple.OptionParser

         * Initializes parser
         *
         * @return OptionParser object with all available options
         */
        protected static OptionParser getParser() {
            OptionParser parser = new OptionParser();
            // help options
            AdminParserUtils.acceptsHelp(parser);
            // required options
            AdminParserUtils.acceptsUrl(parser);
            // optional options
View Full Code Here

Examples of joptsimple.OptionParser

         *
         */
        @SuppressWarnings("unchecked")
        public static void executeCommand(String[] args) throws IOException {

            OptionParser parser = getParser();

            // declare parameters
            String url = null;
            List<Integer> nodeIds = null;
            Boolean allNodes = true;

            // parse command-line input
            OptionSet options = parser.parse(args);
            if(options.has(AdminParserUtils.OPT_HELP)) {
                printHelp(System.out);
                return;
            }

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.