Package joptsimple

Examples of joptsimple.OptionSet.valueOf()


                System.out.println("Starting delete-partitions");
                List<Integer> partitionIdList = (List<Integer>) options.valuesOf("delete-partitions");
                executeDeletePartitions(nodeId, adminClient, partitionIdList, storeNames);
                System.out.println("Finished delete-partitions");
            } else if(options.has("ro-metadata")) {
                String type = (String) options.valueOf("ro-metadata");
                executeROMetadata(nodeId, adminClient, storeNames, type);
            } else if(options.has("reserve-memory")) {
                if(!options.has("stores")) {
                    Utils.croak("Specify the list of stores to reserve memory");
                }
View Full Code Here


                executeROMetadata(nodeId, adminClient, storeNames, type);
            } else if(options.has("reserve-memory")) {
                if(!options.has("stores")) {
                    Utils.croak("Specify the list of stores to reserve memory");
                }
                long reserveMB = (Long) options.valueOf("reserve-memory");
                adminClient.quotaMgmtOps.reserveMemory(nodeId, storeNames, reserveMB);
            } else if(options.has("get-metadata")) {
                String metadataKey = ALL_METADATA;
                if(options.hasArgument("get-metadata")) {
                    metadataKey = (String) options.valueOf("get-metadata");
View Full Code Here

                long reserveMB = (Long) options.valueOf("reserve-memory");
                adminClient.quotaMgmtOps.reserveMemory(nodeId, storeNames, reserveMB);
            } else if(options.has("get-metadata")) {
                String metadataKey = ALL_METADATA;
                if(options.hasArgument("get-metadata")) {
                    metadataKey = (String) options.valueOf("get-metadata");
                }
                executeGetMetadata(nodeId, adminClient, metadataKey, outputDir);
            } else if(options.has("mirror-from-url")) {
                if(!options.has("mirror-node")) {
                    Utils.croak("Specify the mirror node to fetch from");
View Full Code Here

                    System.err.println("Cannot run mirroring without mirror node id");
                    System.exit(1);
                }
                adminClient.restoreOps.mirrorData(nodeId,
                                                  mirrorNodeId,
                                                  (String) options.valueOf("mirror-from-url"),
                                                  storeNames);
            } else if(options.has("clear-rebalancing-metadata")) {
                executeClearRebalancing(nodeId, adminClient);
            } else if(options.has("prune-job")) {
                if(storeNames == null) {
View Full Code Here

                        throw new VoldemortException("set-metadata-pair keys should be <cluster.xml, stores.xml>");
                    }
                }
            } else if(options.has("set-metadata")) {

                String metadataKey = (String) options.valueOf("set-metadata");
                if(!options.has("set-metadata-value")) {
                    throw new VoldemortException("Missing set-metadata-value");
                } else {
                    String metadataValue = (String) options.valueOf("set-metadata-value");
                    if(metadataKey.compareTo(MetadataStore.CLUSTER_KEY) == 0
View Full Code Here

                String metadataKey = (String) options.valueOf("set-metadata");
                if(!options.has("set-metadata-value")) {
                    throw new VoldemortException("Missing set-metadata-value");
                } else {
                    String metadataValue = (String) options.valueOf("set-metadata-value");
                    if(metadataKey.compareTo(MetadataStore.CLUSTER_KEY) == 0
                       || metadataKey.compareTo(MetadataStore.REBALANCING_SOURCE_CLUSTER_XML) == 0) {
                        if(!Utils.isReadableFile(metadataValue))
                            throw new VoldemortException("Cluster xml file path incorrect");
                        ClusterMapper mapper = new ClusterMapper();
View Full Code Here

                }
            } else if(options.has("update-store-defs")) {
                if(!options.has("update-store-value")) {
                    throw new VoldemortException("Missing update-store-value for update-store-defs");
                } else {
                    String storesXmlValue = (String) options.valueOf("update-store-value");

                    if(!Utils.isReadableFile(storesXmlValue))
                        throw new VoldemortException("Stores definition xml file path incorrect");

                    StoreDefinitionsMapper mapper = new StoreDefinitionsMapper();
View Full Code Here

    public static void main(String[] argv) throws Exception {
        OptionParser parser = getParser();
        OptionSet options = parser.parse(argv);
        validateOptions(options);

        String inputPath = (String) options.valueOf("input");
        String storeBdbFolderPath = (String) options.valueOf("bdb");
        String clusterXmlPath = (String) options.valueOf("cluster-xml");
        String storesXmlPath = (String) options.valueOf("stores-xml");
        Integer nodeId = (Integer) options.valueOf("node-id");
        File input = new File(inputPath);
View Full Code Here

        OptionParser parser = getParser();
        OptionSet options = parser.parse(argv);
        validateOptions(options);

        String inputPath = (String) options.valueOf("input");
        String storeBdbFolderPath = (String) options.valueOf("bdb");
        String clusterXmlPath = (String) options.valueOf("cluster-xml");
        String storesXmlPath = (String) options.valueOf("stores-xml");
        Integer nodeId = (Integer) options.valueOf("node-id");
        File input = new File(inputPath);
        List<File> dataFiles = new ArrayList<File>();
View Full Code Here

        OptionSet options = parser.parse(argv);
        validateOptions(options);

        String inputPath = (String) options.valueOf("input");
        String storeBdbFolderPath = (String) options.valueOf("bdb");
        String clusterXmlPath = (String) options.valueOf("cluster-xml");
        String storesXmlPath = (String) options.valueOf("stores-xml");
        Integer nodeId = (Integer) options.valueOf("node-id");
        File input = new File(inputPath);
        List<File> dataFiles = new ArrayList<File>();
        if(input.isDirectory()) {
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.