Package joptsimple

Examples of joptsimple.OptionSet.valueOf()


                    Utils.croak("Must specify the store to enforce the quota on. ");
                }
                if(!options.has("quota-value")) {
                    Utils.croak("Must specify the value of the quota being set");
                }
                String storeName = (String) options.valueOf("store");
                String quotaValue = (String) options.valueOf("quota-value");
                executeSetQuota(adminClient, storeName, quotaType, quotaValue);

            } else if(options.has("unset-quota")) {
                String quotaType = (String) options.valueOf("unset-quota");
View Full Code Here


                }
                if(!options.has("quota-value")) {
                    Utils.croak("Must specify the value of the quota being set");
                }
                String storeName = (String) options.valueOf("store");
                String quotaValue = (String) options.valueOf("quota-value");
                executeSetQuota(adminClient, storeName, quotaType, quotaValue);

            } else if(options.has("unset-quota")) {
                String quotaType = (String) options.valueOf("unset-quota");
                Set<String> validQuotaTypes = QuotaUtils.validQuotaTypes();
View Full Code Here

                String storeName = (String) options.valueOf("store");
                String quotaValue = (String) options.valueOf("quota-value");
                executeSetQuota(adminClient, storeName, quotaType, quotaValue);

            } else if(options.has("unset-quota")) {
                String quotaType = (String) options.valueOf("unset-quota");
                Set<String> validQuotaTypes = QuotaUtils.validQuotaTypes();
                if(!validQuotaTypes.contains(quotaType)) {
                    Utils.croak("Specify a valid quota type from :" + validQuotaTypes);
                }
                if(!options.has("store")) {
View Full Code Here

                    Utils.croak("Specify a valid quota type from :" + validQuotaTypes);
                }
                if(!options.has("store")) {
                    Utils.croak("Must specify the store to enforce the quota on. ");
                }
                String storeName = (String) options.valueOf("store");
                executeUnsetQuota(adminClient, storeName, quotaType);
            } else if(options.has("get-quota")) {
                String quotaType = (String) options.valueOf("get-quota");
                Set<String> validQuotaTypes = QuotaUtils.validQuotaTypes();
                if(!validQuotaTypes.contains(quotaType)) {
View Full Code Here

                    Utils.croak("Must specify the store to enforce the quota on. ");
                }
                String storeName = (String) options.valueOf("store");
                executeUnsetQuota(adminClient, storeName, quotaType);
            } else if(options.has("get-quota")) {
                String quotaType = (String) options.valueOf("get-quota");
                Set<String> validQuotaTypes = QuotaUtils.validQuotaTypes();
                if(!validQuotaTypes.contains(quotaType)) {
                    Utils.croak("Specify a valid quota type from :" + validQuotaTypes);
                }
                if(!options.has("store")) {
View Full Code Here

                    Utils.croak("Specify a valid quota type from :" + validQuotaTypes);
                }
                if(!options.has("store")) {
                    Utils.croak("Must specify the store to enforce the quota on. ");
                }
                String storeName = (String) options.valueOf("store");
                executeGetQuota(adminClient, storeName, quotaType);
            } else {

                Utils.croak("At least one of (delete-partitions, restore, add-node, fetch-entries, "
                            + "fetch-keys, add-stores, delete-store, update-entries, get-metadata, ro-metadata, "
View Full Code Here

        Set<String> missing = CmdUtils.missing(options, "table", "requests", "db");
        if(missing.size() > 0)
            Utils.croak("Missing required arguments: " + Joiner.on(", ").join(missing));

        String host = CmdUtils.valueOf(options, "host", "localhost");
        String table = (String) options.valueOf("table");
        int port = CmdUtils.valueOf(options, "port", 3306);
        String database = (String) options.valueOf("db");
        String jdbcUrl = "jdbc:mysql://" + host + ":" + port + "/" + database;
        String user = CmdUtils.valueOf(options, "user", "root");
        String password = CmdUtils.valueOf(options, "password", "");
View Full Code Here

            Utils.croak("Missing required arguments: " + Joiner.on(", ").join(missing));

        String host = CmdUtils.valueOf(options, "host", "localhost");
        String table = (String) options.valueOf("table");
        int port = CmdUtils.valueOf(options, "port", 3306);
        String database = (String) options.valueOf("db");
        String jdbcUrl = "jdbc:mysql://" + host + ":" + port + "/" + database;
        String user = CmdUtils.valueOf(options, "user", "root");
        String password = CmdUtils.valueOf(options, "password", "");
        String requestFile = (String) options.valueOf("request-file");
        int numRequests = (Integer) options.valueOf("requests");
View Full Code Here

        int port = CmdUtils.valueOf(options, "port", 3306);
        String database = (String) options.valueOf("db");
        String jdbcUrl = "jdbc:mysql://" + host + ":" + port + "/" + database;
        String user = CmdUtils.valueOf(options, "user", "root");
        String password = CmdUtils.valueOf(options, "password", "");
        String requestFile = (String) options.valueOf("request-file");
        int numRequests = (Integer) options.valueOf("requests");
        int numThreads = CmdUtils.valueOf(options, "threads", 10);
        boolean doReads = false;
        boolean doWrites = false;
        if(options.has("reads") || options.has("writes")) {
View Full Code Here

        String database = (String) options.valueOf("db");
        String jdbcUrl = "jdbc:mysql://" + host + ":" + port + "/" + database;
        String user = CmdUtils.valueOf(options, "user", "root");
        String password = CmdUtils.valueOf(options, "password", "");
        String requestFile = (String) options.valueOf("request-file");
        int numRequests = (Integer) options.valueOf("requests");
        int numThreads = CmdUtils.valueOf(options, "threads", 10);
        boolean doReads = false;
        boolean doWrites = false;
        if(options.has("reads") || options.has("writes")) {
            doReads = options.has("reads");
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.