Examples of valueOf()


Examples of joptsimple.OptionSet.valueOf()

            } else if(options.has("rollback")) {
                if(!options.has("version")) {
                    Utils.croak("A read-only push version must be specified with rollback option");
                }
                String storeName = (String) options.valueOf("rollback");
                long pushVersion = (Long) options.valueOf("version");
                executeRollback(nodeId, storeName, pushVersion, adminClient);
            } else if(options.has("query-key")) {
                String key = (String) options.valueOf("query-key");
                String keyFormat = (String) options.valueOf("query-key-format");
                if(keyFormat == null) {
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

                }
                String storeName = (String) options.valueOf("rollback");
                long pushVersion = (Long) options.valueOf("version");
                executeRollback(nodeId, storeName, pushVersion, adminClient);
            } else if(options.has("query-key")) {
                String key = (String) options.valueOf("query-key");
                String keyFormat = (String) options.valueOf("query-key-format");
                if(keyFormat == null) {
                    keyFormat = "hex";
                }
                if(!keyFormat.equals("hex") && !keyFormat.equals("readable")) {
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

                String storeName = (String) options.valueOf("rollback");
                long pushVersion = (Long) options.valueOf("version");
                executeRollback(nodeId, storeName, pushVersion, adminClient);
            } else if(options.has("query-key")) {
                String key = (String) options.valueOf("query-key");
                String keyFormat = (String) options.valueOf("query-key-format");
                if(keyFormat == null) {
                    keyFormat = "hex";
                }
                if(!keyFormat.equals("hex") && !keyFormat.equals("readable")) {
                    throw new VoldemortException("--query-key-format must be hex or readable");
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

                }
                System.out.println("Starting restore");
                adminClient.restoreOps.restoreDataFromReplications(nodeId, parallelism, zoneId);
                System.out.println("Finished restore");
            } else if(options.has("delete-store")) {
                String storeName = (String) options.valueOf("delete-store");
                executeDeleteStore(adminClient, storeName, nodeId);
            } else if(options.has("truncate")) {
                String storeName = (String) options.valueOf("truncate");
                executeTruncateStore(nodeId, adminClient, storeName);
            } else if(options.has("update-entries")) {
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

                System.out.println("Finished restore");
            } else if(options.has("delete-store")) {
                String storeName = (String) options.valueOf("delete-store");
                executeDeleteStore(adminClient, storeName, nodeId);
            } else if(options.has("truncate")) {
                String storeName = (String) options.valueOf("truncate");
                executeTruncateStore(nodeId, adminClient, storeName);
            } else if(options.has("update-entries")) {
                String inputDir = (String) options.valueOf("update-entries");
                executeUpdateEntries(nodeId, adminClient, storeNames, inputDir);
            } else if(options.has("fetch-entries")) {
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

                executeDeleteStore(adminClient, storeName, nodeId);
            } else if(options.has("truncate")) {
                String storeName = (String) options.valueOf("truncate");
                executeTruncateStore(nodeId, adminClient, storeName);
            } else if(options.has("update-entries")) {
                String inputDir = (String) options.valueOf("update-entries");
                executeUpdateEntries(nodeId, adminClient, storeNames, inputDir);
            } else if(options.has("fetch-entries")) {
                boolean useAscii = options.has("ascii");
                System.out.println("Starting fetch entries");
                List<Integer> partitionIdList = null;
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

                checkMetadataVersion(adminClient);
            } else if(options.has("show-routing-plan")) {
                if(!options.has("store")) {
                    Utils.croak("Must specify the store the keys belong to using --store ");
                }
                String storeName = (String) options.valueOf("store");
                List<String> keysToRoute = (List<String>) options.valuesOf("show-routing-plan");
                if(keysToRoute == null || keysToRoute.size() == 0) {
                    Utils.croak("Must specify comma separated keys list in hex format");
                }
                executeShowRoutingPlan(adminClient, storeName, keysToRoute);
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

                    Utils.croak("Must specify comma separated keys list in hex format");
                }
                executeShowRoutingPlan(adminClient, storeName, keysToRoute);

            } else if(options.has("set-quota")) {
                String quotaType = (String) options.valueOf("set-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

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

Examples of joptsimple.OptionSet.valueOf()

                }
                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
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.