Examples of valueOf()


Examples of joptsimple.OptionSet.valueOf()

        final boolean gzipIntermediate = options.has("gzip");
        final SearchStrategy searcher = (SearchStrategy) ReflectUtils.callConstructor(ReflectUtils.loadClass(searcherClass));
        final File workingDir = new File(CmdUtils.valueOf(options,
                                                          "working-dir",
                                                          System.getProperty("java.io.tmpdir")));
        String storeDir = (String) options.valueOf("store-dir");
        ReadOnlyStorageFormat format = ReadOnlyStorageFormat.fromCode(CmdUtils.valueOf(options,
                                                                                       "version",
                                                                                       ReadOnlyStorageFormat.READONLY_V2.toString()));
        Cluster cluster = null;
        int nodeId = 0;
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

                                                               .setRoutingPolicy(RoutingTier.CLIENT)
                                                               .build();

        if(options.has("build")) {
            CmdUtils.croakIfMissing(parser, options, "num-values", "value-size");
            numValues = (Integer) options.valueOf("num-values");
            int numChunks = 1;
            if(options.has("num-chunks"))
                numChunks = (Integer) options.valueOf("num-chunks");
            int valueSize = (Integer) options.valueOf("value-size");
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

        if(options.has("build")) {
            CmdUtils.croakIfMissing(parser, options, "num-values", "value-size");
            numValues = (Integer) options.valueOf("num-values");
            int numChunks = 1;
            if(options.has("num-chunks"))
                numChunks = (Integer) options.valueOf("num-chunks");
            int valueSize = (Integer) options.valueOf("value-size");

            // generate test data
            File temp = null;
            if(options.has("test-gz")) {
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

            CmdUtils.croakIfMissing(parser, options, "num-values", "value-size");
            numValues = (Integer) options.valueOf("num-values");
            int numChunks = 1;
            if(options.has("num-chunks"))
                numChunks = (Integer) options.valueOf("num-chunks");
            int valueSize = (Integer) options.valueOf("value-size");

            // generate test data
            File temp = null;
            if(options.has("test-gz")) {
                temp = new File((String) options.valueOf("test-gz"));
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

            int valueSize = (Integer) options.valueOf("value-size");

            // generate test data
            File temp = null;
            if(options.has("test-gz")) {
                temp = new File((String) options.valueOf("test-gz"));
            } else {
                temp = File.createTempFile("json-data", ".txt.gz", workingDir);
                temp.deleteOnExit();
                System.out.println("Generating test data in " + temp);
                OutputStream outputStream = new GZIPOutputStream(new FileOutputStream(temp));
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

            if(!copyWorked)
                Utils.croak("Copy of data from " + output + " to " + dir + " failed.");
        } else {
            CmdUtils.croakIfMissing(parser, options, "cluster-xml", "node-id");

            String clusterXmlPath = (String) options.valueOf("cluster-xml");
            nodeId = (Integer) options.valueOf("node-id");

            File clusterXml = new File(clusterXmlPath);
            if(!clusterXml.exists()) {
                Utils.croak("Cluster.xml does not exist");
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

                Utils.croak("Copy of data from " + output + " to " + dir + " failed.");
        } else {
            CmdUtils.croakIfMissing(parser, options, "cluster-xml", "node-id");

            String clusterXmlPath = (String) options.valueOf("cluster-xml");
            nodeId = (Integer) options.valueOf("node-id");

            File clusterXml = new File(clusterXmlPath);
            if(!clusterXml.exists()) {
                Utils.croak("Cluster.xml does not exist");
            }
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

            } else if(options.has("native-backup")) {
                if(!options.has("backup-dir")) {
                    Utils.croak("A backup directory must be specified with backup-dir option");
                }

                String backupDir = (String) options.valueOf("backup-dir");
                String storeName = (String) options.valueOf("native-backup");
                int timeout = CmdUtils.valueOf(options, "backup-timeout", 30);
                adminClient.storeMntOps.nativeBackup(nodeId,
                                                     storeName,
                                                     backupDir,
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

                if(!options.has("backup-dir")) {
                    Utils.croak("A backup directory must be specified with backup-dir option");
                }

                String backupDir = (String) options.valueOf("backup-dir");
                String storeName = (String) options.valueOf("native-backup");
                int timeout = CmdUtils.valueOf(options, "backup-timeout", 30);
                adminClient.storeMntOps.nativeBackup(nodeId,
                                                     storeName,
                                                     backupDir,
                                                     timeout,
View Full Code Here

Examples of joptsimple.OptionSet.valueOf()

                                                     options.has("backup-incremental"));
            } 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");
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.