Package joptsimple

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.acceptsStoreSingle(parser);
            AdminParserUtils.acceptsUrl(parser);
            parser.accepts(OPT_VERSION, "rollback read-only store to version")
                  .withRequiredArg()
                  .describedAs("store-version")
                  .ofType(Long.class);
            // optional options
            AdminParserUtils.acceptsNodeMultiple(parser); // either
View Full Code Here


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

            OptionParser parser = getParser();

            // declare parameters
            String storeName = null;
            String url = null;
            Long pushVersion = null;
            List<Integer> nodeIds = null;
            Boolean allNodes = true;
            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

         * Initializes parser
         *
         * @return OptionParser object with all available options
         */
        protected static OptionParser getParser() {
            OptionParser parser = new OptionParser();
            // help options
            CoordinatorAdminUtils.acceptsHelp(parser);
            // required options
            CoordinatorAdminUtils.acceptsUrlMultiple(parser);
            parser.acceptsAll(Arrays.asList(OPT_D, OPT_DEFINITION), "config definition string")
                  .withRequiredArg()
                  .describedAs("store-config-definition-string")
                  .ofType(String.class);
            parser.acceptsAll(Arrays.asList(OPT_F, OPT_FILE), "config file path")
                  .withRequiredArg()
                  .describedAs("store-config-file-path")
                  .ofType(String.class);
            // optional options
            CoordinatorAdminUtils.acceptsConfirm(parser);
View Full Code Here

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

            OptionParser parser = getParser();

            // declare parameters
            List<String> urls = null;
            String storeConfigAvro = null;
            String storeConfigPath = null;
            Boolean confirm = false;

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

View Full Code Here

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

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

            OptionParser parser = getParser();

            // declare parameters
            List<String> urls = null;
            List<String> storeNames = null;
            Boolean confirm = false;

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

View Full Code Here

         * 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.acceptsPartition(parser);
            AdminParserUtils.acceptsNodeSingle(parser);
View Full Code Here

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

            OptionParser parser = getParser();

            // declare parameters
            List<Integer> partIds = null;
            Integer nodeId = null;
            List<String> storeNames = null;
            Boolean allStores = false;
            String url = 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

         * 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.acceptsStoreMultiple(parser);
            AdminParserUtils.acceptsUrl(parser);
View Full Code Here

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

            OptionParser parser = getParser();

            // declare parameters
            List<String> storeNames = null;
            String url = null;
            List<Integer> nodeIds = null;
            Boolean allNodes = true;
            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

TOP

Related Classes of joptsimple.OptionParser

Copyright © 2018 www.massapicom. 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.