Package org.voltdb.regressionsuites

Examples of org.voltdb.regressionsuites.LocalCluster$PipeToFile


        config.compile(project);
        builder.addServerConfig(config);
        // CLUSTER CONFIG #2
        // Two sites, each with two partitions running in separate JVMs
        config = new LocalCluster(PREFIX + "-twoSiteTwoPart.jar", 2, 2, 1, BackendTarget.NATIVE_EE_JNI);
        config.compile(project);
        builder.addServerConfig(config);
        return builder;
    }
View Full Code Here


//        builder.addServerConfig(config);

        ////////////////////////////////////////////////////////////
        // CONFIG #3: cluster of 2 nodes running 2 site each, one replica
        ////////////////////////////////////////////////////////////
        config = new LocalCluster(PREFIX + "-cluster.jar", 2, 2, 1, BackendTarget.NATIVE_EE_JNI);
        success = config.compile(project);
        assert(success);
        builder.addServerConfig(config);

        return builder;
View Full Code Here

        builder = new VoltProjectBuilder();
        builder.addLiteralSchema(simpleSchema);
        builder.addProcedures(CrashJVM.class);
        builder.addProcedures(CrashVoltDBProc.class);

        cluster = new LocalCluster("collect.jar",
                2, 1, 0, BackendTarget.NATIVE_EE_JNI);
        cluster.setHasLocalServer(false);
        boolean success = cluster.compile(builder);
        assert (success);
        cluster.startUp(true);
View Full Code Here

    }

    static public junit.framework.Test suite() throws Exception
    {
        TheHashinator.initialize(LegacyHashinator.class, LegacyHashinator.getConfigureBytes(2));
        LocalCluster config;

        final MultiConfigSuiteBuilder builder =
            new MultiConfigSuiteBuilder(TestGroovyDeployment.class);

        VoltProjectBuilder project = new VoltProjectBuilder();
        project.addLiteralSchema(SCHEMA);

        /*
         * compile the catalog all tests start with
         */
        config = new LocalCluster("groovy-ddl-cluster-rep.jar", 2, 1, 0,
                BackendTarget.NATIVE_EE_JNI, LocalCluster.FailureState.ALL_RUNNING, true, false, null);
        boolean compile = config.compile(project);
        assertTrue(compile);
        config.setHasLocalServer(false);
        config.setMaxHeap(512);
        builder.addServerConfig(config);

        return builder;
    }
View Full Code Here

        MixedVersionCluster(String[] versions, String[] regexOverrides) {
            assert(versions != null);
            assert(regexOverrides != null);
            assert(versions.length == regexOverrides.length);

            m_cluster = new LocalCluster(
                    JAR_NAME,
                    2,
                    versions.length,
                    K,
                    BackendTarget.NATIVE_EE_JNI);
View Full Code Here

        builder.addProcedures(CrashVoltDBProc.class);
        /*boolean success = builder.compile(Configuration.getPathToCatalogForTest("crash.jar"), 1, 1, 0, "localhost");
        assert(success);
        MiscUtils.copyFile(builder.getPathToDeployment(), Configuration.getPathToCatalogForTest("crash.xml"));*/

        LocalCluster cluster = new LocalCluster("crash.jar",
                2, 2, 1, BackendTarget.NATIVE_EE_JNI);
        cluster.setHasLocalServer(true);
        boolean success = cluster.compile(builder);
        assert (success);
        cluster.startUp(true);

        final String listener = cluster.getListenerAddresses().get(0);
        final Client client = ClientFactory.createClient();
        //client.createConnection(listener);
        client.createConnection(listener);

        try {
            client.callProcedure("CrashVoltDBProc");
        }
        catch (Exception e) {

        }

        Thread.sleep(10000);

        client.close();
        cluster.shutDown();
    }
View Full Code Here

        MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestJDBCMultiNodeConnection.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

            catch (Exception e) {
                e.printStackTrace();
                fail("Failed to set up schema");
            }

            m_cluster = new LocalCluster(pathToCatalog, siteCount, hostCount, kFactor,
                                         BackendTarget.NATIVE_EE_JNI,
                                         LocalCluster.FailureState.ALL_RUNNING,
                                         m_debug);
            m_cluster.setHasLocalServer(true);
            boolean success = m_cluster.compile(m_builder);
View Full Code Here

            builder.addPartitionInfo("blah", "ival");
            // this is a NOOP as builder will only honor it if there is
            // and accompanying call to builder.addExport
            builder.setTableAsExportOnly("blah");

            LocalCluster cluster = new LocalCluster("latencycheck.jar",
                    2, 1, 0, BackendTarget.NATIVE_EE_JNI);
            cluster.setHasLocalServer(true);
            boolean success = cluster.compile(builder);
            assert(success);

            cluster.startUp(true);

            final String listener = cluster.getListenerAddresses().get(0);
            final Client client = ClientFactory.createClient();
            client.createConnection(listener);

            long iterations = 10000;
            long start = System.nanoTime();
            for (int i = 0; i < iterations; i++) {
                client.callProcedure("Insert", i);
            }
            long end = System.nanoTime();

            double ms = (end - start) / 1000000.0;

            client.close();
            cluster.shutDown();

            System.out.printf("Avg latency was %.3f ms.\n", ms / iterations);

        }
        catch (Exception e) {
View Full Code Here

        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;
            // Can't create a procedure without a class, Marge
            resp = m_client.callProcedure("@SystemCatalog", "CLASSES");
            System.out.println("CLASSES: " + resp.getResults()[0]);
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.