Package edu.brown.utils

Examples of edu.brown.utils.ArgumentsParser


    public static void main(String[] vargs) throws Exception {
        if (ClassUtil.isAssertsEnabled()) {
            LOG.warn("\n" + HStore.getAssertWarning());
        }
       
        ArgumentsParser args = ArgumentsParser.load(vargs,
            ArgumentsParser.PARAM_CATALOG,
            ArgumentsParser.PARAM_SITE_ID,
            ArgumentsParser.PARAM_CONF
        );
       
        // HStoreSite Stuff
        final int site_id = args.getIntParam(ArgumentsParser.PARAM_SITE_ID);
        Thread t = Thread.currentThread();
        t.setName(HStoreThreadManager.getThreadName(site_id, null, "main"));
       
        HStoreConf hstore_conf = HStoreConf.initArgumentsParser(args);
        if (debug.val)
            LOG.debug("HStoreConf Parameters:\n" + HStoreConf.singleton().toString(true));
       
        HStoreSite hstore_site = HStore.initialize(args.catalogContext, site_id, hstore_conf);

        // ----------------------------------------------------------------------------
        // Workload Trace Output
        // ----------------------------------------------------------------------------
        if (args.hasParam(ArgumentsParser.PARAM_WORKLOAD_OUTPUT)) {
            ProcedureProfiler.profilingLevel = ProcedureProfiler.Level.INTRUSIVE;
            String traceClass = Workload.class.getName();
            String tracePath = args.getParam(ArgumentsParser.PARAM_WORKLOAD_OUTPUT) + "-" + site_id;
            String traceIgnore = args.getParam(ArgumentsParser.PARAM_WORKLOAD_PROC_EXCLUDE);
            ProcedureProfiler.initializeWorkloadTrace(args.catalog, traceClass, tracePath, traceIgnore);
            LOG.info("Enabled workload logging '" + tracePath + "'");
        }
       
        if (args.thresholds != null) hstore_site.setThresholds(args.thresholds);
View Full Code Here


        setLocationRelativeTo(this.getOwner());
    }

    public static void main(String[] vargs) throws Exception
    {
        final ArgumentsParser args = ArgumentsParser.load(vargs);
        BenchmarkEnv.setExternalArgs(args);

        javax.swing.SwingUtilities.invokeLater(new Runnable()
        {
            public void run()
View Full Code Here

        return ret;
    }

    public static void loadTraceFile()
    {
        ArgumentsParser args = BenchmarkEnv.getExternalArgs();
        try
        {
            args.require(ArgumentsParser.PARAM_CATALOG, ArgumentsParser.PARAM_MARKOV);
            Map<Procedure, MarkovGraph> tmp = null;
//            MarkovUtil.load(args.catalog_db,;
//                                                              args.getParam(ArgumentsParser.PARAM_MARKOV),
//                                                              CatalogUtil.getAllPartitionIds(args.catalog_db)).get(0);
View Full Code Here

        return (cresponse);
    }
   
   
    public static void main(String[] vargs) throws Exception {
        ArgumentsParser args = ArgumentsParser.load(vargs);
        args.require(ArgumentsParser.PARAM_CATALOG);
       
        String procName = args.getOptParam(0);
        String parameters[] = new String[args.getOptParamCount()-1];
        for (int i = 0; i < parameters.length; i++) {
            parameters[i] = args.getOptParam(i+1);
        } // FOR
       
        Client client = ClientFactory.createClient(128, null, false, null);
        Cluster catalog_clus = args.catalog_db.getParent();
        Site catalog_site = CollectionUtil.first(catalog_clus.getSites());
View Full Code Here

import edu.brown.utils.ArgumentsParser;

public class HStoreClientExample {
    public static void main(String[] vargs) throws Exception {
        ArgumentsParser args = ArgumentsParser.load(vargs);
        args.require(ArgumentsParser.PARAM_CATALOG_HOSTS);
       
        // connect to VoltDB server
        Client client = ClientFactory.createClient();
        client.createConnection(null, args.getParam(ArgumentsParser.PARAM_CATALOG_HOSTS), HStoreConstants.DEFAULT_PORT, "user", "password");

        // long w_id, String w_name, String w_street_1, String w_street_2, String w_city, String w_state, String w_zip, double w_tax, double w_ytd
        VoltTable[] result = client.callProcedure("InsertSubscriber", 1l, "0000001").getResults();
       
//        VoltTable[] result = client.callProcedure("InsertWarehouse",
View Full Code Here

        } // FOR
        return (sb.toString());
    }
   
    public static void main(String[] vargs) throws Exception {
        ArgumentsParser args = ArgumentsParser.load(vargs);
       
        // Default HStoreConf
        HStoreConf hstore_conf = HStoreConf.singleton(true);
       
        // Build Common
        File file = new File(args.getOptParam(0));
        assert(file.exists());
        StringBuilder sb = new StringBuilder();
        sb.append(makeBuildCommonHeader());
        for (String group : groups) {
            sb.append(makeBuildCommonXML(hstore_conf, group));
View Full Code Here

public abstract class MarkovPathEstimatorDumper {
    private static final Logger LOG = Logger.getLogger(MarkovPathEstimatorDumper.class);

    public static void main(String[] vargs) throws Exception {
        ArgumentsParser args = ArgumentsParser.load(vargs);
        args.require(
            ArgumentsParser.PARAM_CATALOG,
            ArgumentsParser.PARAM_WORKLOAD,
            ArgumentsParser.PARAM_MAPPINGS,
            ArgumentsParser.PARAM_MARKOV
        );
       
        // Word up
        PartitionEstimator p_estimator = new PartitionEstimator(args.catalogContext);
       
        // Create MarkovGraphsContainer
        File input_path = args.getFileParam(ArgumentsParser.PARAM_MARKOV);
        Map<Integer, MarkovGraphsContainer> m = MarkovUtil.load(args.catalogContext, input_path);
       
        // Blah blah blah...
        Map<Integer, MarkovEstimator> t_estimators = new HashMap<Integer, MarkovEstimator>();
        for (Integer id : m.keySet()) {
View Full Code Here

         * total_cost += node_cost; } // FOR
         */return (total_cost);
    }

    public static void main(String[] vargs) throws Exception {
        ArgumentsParser args = ArgumentsParser.load(vargs);
        new BruteForceMapper(null, null).search(20);
    }
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_WORKLOAD_OUTPUT
        );
        String output_path = args.getParam(ArgumentsParser.PARAM_WORKLOAD_OUTPUT);
        assert(output_path != null);
        ProjectType type = args.catalog_type;
       
        updateTraceIds(args.catalog_db, args.workload, output_path);
       
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);

    WorkloadAnalyzer analyzer = new WorkloadAnalyzer(args.catalog_db,
        args.workload);
    analyzer.getCountOfGroupingsPossible();
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.