Package org.voltdb.regressionsuites

Examples of org.voltdb.regressionsuites.LocalCluster$PipeToFile


        boolean success = builder.compile(pathToCatalog, 2, 1, 0);
        assertTrue("Schema compilation failed", success);
        MiscUtils.copyFile(builder.getPathToDeployment(), pathToDeployment);

        try {
            LocalCluster cluster = new LocalCluster("updateclasses.jar", 2, 1, 0, BackendTarget.NATIVE_EE_JNI);
            cluster.compile(builder);
            cluster.setHasLocalServer(false);
            cluster.startUp();
            m_client = ClientFactory.createClient();
            m_client.createConnection(cluster.getListenerAddress(0));

            ClientResponse resp;
            resp = m_client.callProcedure("@SystemCatalog", "CLASSES");
            System.out.println(resp.getResults()[0]);
View Full Code Here


        MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestJDBCConnectionFail.class);

        // build up a project builder for the workload
        VoltProjectBuilder project = getBuilderForTest();
        boolean success;
        m_config = new LocalCluster("decimal-default.jar", 4, 5, kfactor, BackendTarget.NATIVE_EE_JNI);
        m_config.setHasLocalServer(true);
        success = m_config.compile(project);
        assertTrue(success);

        // add this config to the set of tests to run
View Full Code Here

        }
    }

    public void testHaltLiveRejoinOnOverflow() throws Exception {

        LocalCluster cluster = null;
        Client client = null;

        VoltTable pTable = TableHelper.quickTable("P (ID:BIGINT-N, VALUE:BIGINT-N) PK(ID)");

        // build and compile a catalog
        System.out.println("Compiling catalog.");
        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema(TableHelper.ddlForTable(pTable));
        builder.addLiteralSchema("PARTITION TABLE P ON COLUMN ID;\n" +
                "CREATE PROCEDURE FROM CLASS org.voltdb.planner.ScanPerfTest$ScanTable;\n" +
                "PARTITION PROCEDURE ScanPerfTest$ScanTable ON TABLE P COLUMN ID;\n");
        cluster = new LocalCluster("scanperf.jar", 8, 1, 0, BackendTarget.NATIVE_EE_JNI);
        //cluster.setMaxHeap(10);
        boolean success = cluster.compile(builder);
        assertTrue(success);

        //fail();

        System.out.println("Starting cluster.");
        cluster.setHasLocalServer(false);
        cluster.overrideAnyRequestForValgrind();
        cluster.startUp(true, ReplicationRole.NONE);

        System.out.println("Getting client connected.");
        ClientConfig clientConfig = new ClientConfig();
        client = ClientFactory.createClient(clientConfig);
        for (String address : cluster.getListenerAddresses()) {
            client.createConnection(address);
        }

        System.out.println("Loading");

        Random r = new Random();

        // load up > 1gb data
        fillTable(6000, client, r);
        System.out.println("100% loaded.");

        client.drain();
        client.close();

        System.out.println("Getting client re-connected.");
        clientConfig = new ClientConfig();
        clientConfig.setProcedureCallTimeout(Long.MAX_VALUE);
        clientConfig.setMaxOutstandingTxns(50);
        client = ClientFactory.createClient(clientConfig);
        for (String address : cluster.getListenerAddresses()) {
            client.createConnection(address);
        }

        long start = System.currentTimeMillis();
        for (int i = 0; i < 12; i++) {
            while ((System.currentTimeMillis() - start) < ((i+1) * 5000)) {
                client.callProcedure(new ScanCallback(), "ScanPerfTest$ScanTable", r.nextLong());
            }
            System.out.printf("Scanned at %.2f rows/sec when %.0f%% done.\n",
                    rows.get() / (nanos.get() / 1000000000.0), ((i+1) / 12.0) * 100);
            System.out.printf("%d scans on an average of %d rows/partition\n",
                    scans.get(), rows.get() / scans.get());
            System.out.printf("%.2f scans per second\n",
                    scans.get() / (nanos.get() / 1000000000.0));
        }

        System.out.println("Draining.");

        client.drain();
        client.close();

        System.out.printf("Scanned at %f rows/sec after drain.\n",
                rows.get() / (nanos.get() / 1000000000.0));

        cluster.shutDown();
    }
View Full Code Here

TOP

Related Classes of org.voltdb.regressionsuites.LocalCluster$PipeToFile

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.