Package joptsimple

Examples of joptsimple.OptionSet.valueOf()


        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()) {
            File[] files = input.listFiles();
View Full Code Here


        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()) {
            File[] files = input.listFiles();
            if(files != null)
View Full Code Here

    public static void main(String[] args) throws Exception {
        setupParser();
        OptionSet options = getValidOptions(args);

        // Bootstrap & fetch current cluster/stores
        String bootstrapURL = (String) options.valueOf("url");

   
        int parallelism = RebalanceController.MAX_PARALLEL_REBALANCING;
        if(options.has("parallelism")) {
            parallelism = (Integer) options.valueOf("parallelism");
View Full Code Here

        String bootstrapURL = (String) options.valueOf("url");

   
        int parallelism = RebalanceController.MAX_PARALLEL_REBALANCING;
        if(options.has("parallelism")) {
            parallelism = (Integer) options.valueOf("parallelism");
        }

        long proxyPauseSec = RebalanceController.PROXY_PAUSE_IN_SECONDS;
        if(options.has("proxy-pause")) {
            proxyPauseSec = (Long) options.valueOf("proxy-pause");
View Full Code Here

            parallelism = (Integer) options.valueOf("parallelism");
        }

        long proxyPauseSec = RebalanceController.PROXY_PAUSE_IN_SECONDS;
        if(options.has("proxy-pause")) {
            proxyPauseSec = (Long) options.valueOf("proxy-pause");
        }

        RebalanceController rebalanceController = new RebalanceController(bootstrapURL,
                                                                          parallelism,
                                                                          proxyPauseSec);
View Full Code Here

        List<StoreDefinition> currentStoreDefs = rebalanceController.getCurrentStoreDefs();
        // If this test doesn't pass, something is wrong in prod!
        RebalanceUtils.validateClusterStores(currentCluster, currentStoreDefs);

        // Determine final cluster/stores and validate them
        String finalClusterXML = (String) options.valueOf("final-cluster");
        Cluster finalCluster = new ClusterMapper().readCluster(new File(finalClusterXML));

        List<StoreDefinition> finalStoreDefs = currentStoreDefs;
        if(options.has("final-stores")) {
            String storesXML = (String) options.valueOf("final-stores");
View Full Code Here

        String finalClusterXML = (String) options.valueOf("final-cluster");
        Cluster finalCluster = new ClusterMapper().readCluster(new File(finalClusterXML));

        List<StoreDefinition> finalStoreDefs = currentStoreDefs;
        if(options.has("final-stores")) {
            String storesXML = (String) options.valueOf("final-stores");
            finalStoreDefs = new StoreDefinitionsMapper().readStoreList(new File(storesXML));
        }
        RebalanceUtils.validateClusterStores(finalCluster, finalStoreDefs);
        RebalanceUtils.validateCurrentFinalCluster(currentCluster, finalCluster);
View Full Code Here

        // Process optional "planning" arguments
        int batchSize = CmdUtils.valueOf(options, "batch-size", RebalancePlan.BATCH_SIZE);

        String outputDir = null;
        if(options.has("output-dir")) {
            outputDir = (String) options.valueOf("output-dir");
        }

        // Plan & execute rebalancing.
        rebalanceController.rebalance(new RebalancePlan(currentCluster,
                                                        currentStoreDefs,
View Full Code Here

            logger.error("Both 'src-url' and 'dst-url' options are mandatory");
            parser.printHelpOn(System.out);
            return;
        }

        String srcBootstrapUrl = (String) options.valueOf("src-url");
        String dstBootstrapUrl = (String) options.valueOf("dst-url");
        int maxPutsPerSecond = DEFAULT_MAX_PUTS_PER_SEC;
        if(options.has("max-puts-per-second"))
            maxPutsPerSecond = (Integer) options.valueOf("max-puts-per-second");
        List<String> storesList = null;
View Full Code Here

            parser.printHelpOn(System.out);
            return;
        }

        String srcBootstrapUrl = (String) options.valueOf("src-url");
        String dstBootstrapUrl = (String) options.valueOf("dst-url");
        int maxPutsPerSecond = DEFAULT_MAX_PUTS_PER_SEC;
        if(options.has("max-puts-per-second"))
            maxPutsPerSecond = (Integer) options.valueOf("max-puts-per-second");
        List<String> storesList = null;
        if(options.has("stores")) {
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.