Package joptsimple

Examples of joptsimple.OptionSet.valueOf()


            CmdUtils.croakIfMissing(parser, options, "requests");

            final int numThreads = CmdUtils.valueOf(options, "threads", 10);
            final int numRequests = (Integer) options.valueOf("requests");
            final int numValues = (Integer) options.valueOf("num-values");
            final int valueSize = CmdUtils.valueOf(options, "value-size", 1024);
            final int cacheWidth = CmdUtils.valueOf(options, "cache-width", 100000);
            final double cacheHitRatio = CmdUtils.valueOf(options, "cache-hit-ratio", 0.5);
            final String propsFile = (String) options.valueOf("props");
            final boolean cleanUp = options.has("clean-up");
View Full Code Here


            final int numRequests = (Integer) options.valueOf("requests");
            final int numValues = (Integer) options.valueOf("num-values");
            final int valueSize = CmdUtils.valueOf(options, "value-size", 1024);
            final int cacheWidth = CmdUtils.valueOf(options, "cache-width", 100000);
            final double cacheHitRatio = CmdUtils.valueOf(options, "cache-hit-ratio", 0.5);
            final String propsFile = (String) options.valueOf("props");
            final boolean cleanUp = options.has("clean-up");
            final String storageEngineClass = CmdUtils.valueOf(options,
                                                               "storage-configuration-class",
                                                               BdbStorageConfiguration.class.getName())
                                                      .trim();
View Full Code Here

                                                               "storage-configuration-class",
                                                               BdbStorageConfiguration.class.getName())
                                                      .trim();
            File dataDir = null;
            if(options.has("data-dir"))
                dataDir = new File((String) options.valueOf("data-dir"));
            else
                dataDir = TestUtils.createTempDir();
            System.out.println("Data dir: " + dataDir);

            // create the storage engine
View Full Code Here

        ClientConfig clientConfig = new ClientConfig().setBootstrapUrls(bootstrapUrl)
                                                      .setEnableLazy(false)
                                                      .setRequestFormatType(RequestFormatType.VOLDEMORT_V3);

        if(options.has("client-zone-id")) {
            clientConfig.setClientZoneId((Integer) options.valueOf("client-zone-id"));
        }

        VoldemortClientShell shell = new VoldemortClientShell(clientConfig,
                                                              storeName,
                                                              inputReader,
View Full Code Here

                System.exit(1);
            }
        }

        try {
            String url = (String) options.valueOf("url");
            Integer nodeId = CmdUtils.valueOf(options, "node", -1);
            int parallelism = CmdUtils.valueOf(options, "restore", 5);
            Integer zoneId = CmdUtils.valueOf(options, "zone", -1);

            AdminClient adminClient = new AdminClient(url,
View Full Code Here

            if(options.has("store") && options.has("stores")) {
                throw new VoldemortException("Must not specify both --stores and --store options");
            } else if(options.has("stores")) {
                storeNames = (List<String>) options.valuesOf("stores");
            } else if(options.has("store")) {
                storeNames = Arrays.asList((String) options.valueOf("store"));
            }

            String outputDir = null;
            if(options.has("outdir")) {
                outputDir = (String) options.valueOf("outdir");
View Full Code Here

                storeNames = Arrays.asList((String) options.valueOf("store"));
            }

            String outputDir = null;
            if(options.has("outdir")) {
                outputDir = (String) options.valueOf("outdir");
            }

            if(options.has("add-stores")) {
                String storesXml = (String) options.valueOf("add-stores");
                executeAddStores(adminClient, storesXml, nodeId);
View Full Code Here

            if(options.has("outdir")) {
                outputDir = (String) options.valueOf("outdir");
            }

            if(options.has("add-stores")) {
                String storesXml = (String) options.valueOf("add-stores");
                executeAddStores(adminClient, storesXml, nodeId);
            } else if(options.has("async")) {
                String asyncKey = (String) options.valueOf("async");
                List<Integer> asyncIds = null;
                if(options.hasArgument("async-id"))
View Full Code Here

            if(options.has("add-stores")) {
                String storesXml = (String) options.valueOf("add-stores");
                executeAddStores(adminClient, storesXml, nodeId);
            } else if(options.has("async")) {
                String asyncKey = (String) options.valueOf("async");
                List<Integer> asyncIds = null;
                if(options.hasArgument("async-id"))
                    asyncIds = (List<Integer>) options.valuesOf("async-id");
                executeAsync(nodeId, adminClient, asyncKey, asyncIds);
            } else if(options.has("check-metadata")) {
View Full Code Here

                List<Integer> asyncIds = null;
                if(options.hasArgument("async-id"))
                    asyncIds = (List<Integer>) options.valuesOf("async-id");
                executeAsync(nodeId, adminClient, asyncKey, asyncIds);
            } else if(options.has("check-metadata")) {
                String metadataKey = (String) options.valueOf("check-metadata");
                executeCheckMetadata(adminClient, metadataKey);
            } else if(options.has("delete-partitions")) {
                System.out.println("Starting delete-partitions");
                List<Integer> partitionIdList = (List<Integer>) options.valuesOf("delete-partitions");
                executeDeletePartitions(nodeId, adminClient, partitionIdList, storeNames);
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.