Package edu.brown.utils

Examples of edu.brown.utils.ArgumentsParser


    /**
     * @param args
     */
    public static void main(String[] vargs) throws Exception {
        ArgumentsParser args = ArgumentsParser.load(vargs);
        args.require(ArgumentsParser.PARAM_CATALOG,
                     ArgumentsParser.PARAM_WORKLOAD,
                     ArgumentsParser.PARAM_STATS,
                     ArgumentsParser.PARAM_MAPPINGS
        );
        HStoreConf.initArgumentsParser(args);
        System.err.println("TEMP DIR: " + HStoreConf.singleton().global.temp_dir);

        if (args.hasParam(ArgumentsParser.PARAM_CATALOG_HOSTS)) {
            ClusterConfiguration cc = new ClusterConfiguration(args.getParam(ArgumentsParser.PARAM_CATALOG_HOSTS));
            args.updateCatalog(FixCatalog.cloneCatalog(args.catalog, cc), null);
        }

        // Create the container object that will hold all the information that
        // the designer will need to use
        DesignerInfo info = new DesignerInfo(args);
View Full Code Here


   
    /**
     * @param args
     */
    public static void main(final String[] vargs) throws Exception {
        final ArgumentsParser args = ArgumentsParser.load(vargs);
        assert(args.catalog != null);
       
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                StatsViewer viewer = new StatsViewer(args);
View Full Code Here

    /**
     * @param args
     */
    public static void main(String[] vargs) throws Exception {
        ArgumentsParser args = ArgumentsParser.load(vargs);
        args.require(ArgumentsParser.PARAM_CATALOG, ArgumentsParser.PARAM_WORKLOAD, ArgumentsParser.PARAM_STATS, ArgumentsParser.PARAM_MAPPINGS);

        // If given a PartitionPlan, then update the catalog
        if (args.hasParam(ArgumentsParser.PARAM_PARTITION_PLAN)) {
            File pplan_path = new File(args.getParam(ArgumentsParser.PARAM_PARTITION_PLAN));
            if (pplan_path.exists()) {
                PartitionPlan pplan = new PartitionPlan();
                pplan.load(pplan_path, args.catalog_db);
                pplan.apply(args.catalog_db);
                LOG.info("Applied PartitionPlan '" + pplan_path + "'");
View Full Code Here

    public static final Integer WINDOW_HEIGHT = 650;

    protected GraphVisualizationPanel<DesignerVertex, DesignerEdge> graph_panel;
   
    public SchemaVisualization(Database catalog_db) {
        super(new ArgumentsParser(), "DB Schema Visualizer");
        this.args.catalog_db = catalog_db;
        this.menuHandler = new SchemaVisualization.MenuHandler();
        this.init();
    }
View Full Code Here

   
    /**
     * @param args
     */
    public static void main(final String[] vargs) throws Exception {
        final ArgumentsParser args = ArgumentsParser.load(vargs);
       
        //edu.uci.ics.jung.samples.TreeLayoutDemo.main(args);
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                SchemaVisualization gui = new SchemaVisualization(args);
View Full Code Here

            }
        }.traverse(this.root);
    }

    public static void main(String[] vargs) throws Exception {
        ArgumentsParser args = ArgumentsParser.load(vargs);
        args.require(ArgumentsParser.PARAM_CATALOG);

        String proc_name = args.getOptParam(0);
        String stmt_name = args.getOptParam(1);

        Procedure catalog_proc = args.catalog_db.getProcedures().getIgnoreCase(proc_name);
        assert (catalog_proc != null) : "Invalid Procedure Name: " + proc_name;

        Statement catalog_stmt = catalog_proc.getStatements().getIgnoreCase(stmt_name);
View Full Code Here

            } // FOR
        } // FOR
    }

    public static void main(String[] vargs) throws Exception {
        ArgumentsParser args = ArgumentsParser.load(vargs);
        args.require(ArgumentsParser.PARAM_CATALOG, ArgumentsParser.PARAM_WORKLOAD);
        DesignerInfo info = new DesignerInfo(args);
        boolean global = true;
        boolean single = false;

        if (global) {
View Full Code Here

        }
        return (sb.toString());
    }

    public static void main(String vargs[]) throws Exception {
        ArgumentsParser args = ArgumentsParser.load(vargs,
                ArgumentsParser.PARAM_CATALOG
        );
        HStoreTerminal term = new HStoreTerminal(args.catalog);
       
        // CSV OUTPUT
        if (args.hasBooleanParam(ArgumentsParser.PARAM_TERMINAL_CSV)) {
            term.enable_csv = args.getBooleanParam(ArgumentsParser.PARAM_TERMINAL_CSV);
        }
        // HOSTNAME
        if (args.hasParam(ArgumentsParser.PARAM_TERMINAL_HOST)) {
            term.hostname = args.getParam(ArgumentsParser.PARAM_TERMINAL_HOST);
        }
        // PORT
        if (args.hasParam(ArgumentsParser.PARAM_TERMINAL_PORT)) {
            term.port = args.getIntParam(ArgumentsParser.PARAM_TERMINAL_PORT);
        }
       
        term.run();
    }
View Full Code Here

    /**
     * @param args
     */
    public static void main(String[] vargs) throws Exception {
        ArgumentsParser.DISABLE_UPDATE_CATALOG = true;
        ArgumentsParser args = ArgumentsParser.load(vargs);
        args.require(ArgumentsParser.PARAM_CATALOG_TYPE, ArgumentsParser.PARAM_CATALOG_OUTPUT);

        // ProjectType type = args.catalog_type;
        String catalogOutputPath = args.getParam(ArgumentsParser.PARAM_CATALOG_OUTPUT);

        // Populate Parameter Mappings
        if (args.hasParam(ArgumentsParser.PARAM_MAPPINGS)) {
            File input_path = args.getFileParam(ArgumentsParser.PARAM_MAPPINGS);
            if (input_path.exists()) {
                ParameterMappingsSet mappings = new ParameterMappingsSet();
                mappings.load(input_path, args.catalog_db);
                ParametersUtil.applyParameterMappings(args.catalog_db, mappings);
                LOG.debug("Applied ParameterMappings file to '" + input_path + "' catalog parameter mappings...");
            } else {
                LOG.warn("ParameterMappings file '" + input_path + "' does not exist. Ignoring...");
            }
        }

        // Fix the catalog!
        // populateCatalog(args.catalog_db, type);

        // Populate host information
        Catalog new_catalog = args.catalog;
        if (args.hasIntParam(ArgumentsParser.PARAM_CATALOG_NUM_HOSTS)) {
            String host_format = args.getParam(ArgumentsParser.PARAM_CATALOG_HOSTS);

            int num_hosts = args.getIntParam(ArgumentsParser.PARAM_CATALOG_NUM_HOSTS);
            int num_sites_per_host = (args.hasIntParam(ArgumentsParser.PARAM_CATALOG_SITES_PER_HOST) ? args.getIntParam(ArgumentsParser.PARAM_CATALOG_SITES_PER_HOST) : 2);
            int num_partitions_per_site = (args.hasIntParam(ArgumentsParser.PARAM_CATALOG_PARTITIONS_PER_SITE) ? args.getIntParam(ArgumentsParser.PARAM_CATALOG_PARTITIONS_PER_SITE) : 2);

            if (host_format == null) {
                FixCatalog.updateCatalog(new_catalog, num_hosts, num_sites_per_host, num_partitions_per_site);
            } else {
                FixCatalog.updateCatalog(new_catalog, host_format, num_hosts, num_sites_per_host, num_partitions_per_site);
            }

        // Use host list
        } else {
            String hostsInfo = args.getParam(ArgumentsParser.PARAM_CATALOG_HOSTS);
            ClusterConfiguration cc = new ClusterConfiguration(hostsInfo);
            FixCatalog.updateCatalog(new_catalog, cc);
        }

        // Now construct the new Dtxn.Coordinator configuration
View Full Code Here

    /**
     * @param args
     */
    public static void main(String[] vargs) throws Exception {
        ArgumentsParser args = ArgumentsParser.load(vargs);
        assert (args.stats != null);

        String output_path = args.getParam(ArgumentsParser.PARAM_STATS_OUTPUT);
        assert (output_path != null);
        ProjectType project_type = args.catalog_type;

        // Fix the catalog!
        populateStatistics(project_type, args.catalog_db, args.stats);
View Full Code Here

TOP

Related Classes of edu.brown.utils.ArgumentsParser

Copyright © 2018 www.massapicom. 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.