Examples of VoltProjectBuilder


Examples of org.voltdb.compiler.VoltProjectBuilder

    static public Test suite() {
        // the suite made here will all be using the tests from this class
        MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestProcedureAPISuite.class);

        // build up a project builder for the workload
        VoltProjectBuilder project = new VoltProjectBuilder();
        project.addSchema(TestProcedureAPISuite.class.getResource("procedureapisuite-ddl.sql"));
        project.addPartitionInfo("P1", "ID");
        project.addProcedures(PROCEDURES);

        /////////////////////////////////////////////////////////////
        // CONFIG #1: 2 Local Site/Partitions running on JNI backend
        /////////////////////////////////////////////////////////////
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder

        rport = SecureRandom.getInstance("SHA1PRNG").nextInt(2000) + 22000;
        System.out.println("Random Internal port is: " + rport);
        ncprocess = new PortListener(rport);
        try {
            //Build the catalog
            VoltProjectBuilder builder = new VoltProjectBuilder();
            builder.addLiteralSchema("");
            String catalogJar = "dummy.jar";

            LocalCluster config = new LocalCluster(catalogJar, 2, 1, 0, BackendTarget.NATIVE_EE_JNI);

            config.portGenerator.enablePortProvider();
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder

    public TestDecimalDefaults(String name) {
        super(name);
    }

    static VoltProjectBuilder getBuilderForTest() throws IOException {
        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema("CREATE TABLE T(" +
                                 "A1 INTEGER NOT NULL, " +
                                 "A2 DECIMAL, " +
                                 "A3 DECIMAL DEFAULT 0, " +
                                 "A4 DECIMAL DEFAULT 999, " +
                                 "A5 DECIMAL DEFAULT 9.99E2, " +
                                 "A6 DECIMAL DEFAULT 1.012345678901, " +
                                 "PRIMARY KEY(A1));"
                                 );
        builder.addPartitionInfo("T", "A1");
        builder.addStmtProcedure("Insert", "INSERT INTO T(A1) VALUES(?);", "T.A1: 0");
        builder.addStmtProcedure("Select", "SELECT * FROM T WHERE A1 = ?;", "T.A1: 0");
        return builder;
    }
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder

    static public Test suite() throws IOException {
        // the suite made here will all be using the tests from this class
        MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestDecimalDefaults.class);

        // build up a project builder for the workload
        VoltProjectBuilder project = getBuilderForTest();
        boolean success;
        LocalCluster config = new LocalCluster("decimal-default.jar", 2, 1, 0, BackendTarget.NATIVE_EE_JNI);
        success = config.compile(project);
        assertTrue(success);
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder

    @Override
    public void setUp() throws Exception {
        try {
            //Build the catalog
            VoltProjectBuilder builder = new VoltProjectBuilder();
            builder.addLiteralSchema("");
            builder.setSecurityEnabled(true);
            String catalogJar = "dummy.jar";

            LocalCluster config = new LocalCluster(catalogJar, 2, 1, 0, BackendTarget.NATIVE_EE_JNI);

            config.setHasLocalServer(false);
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder

                        "  dval FLOAT DEFAULT '0' NOT NULL,\n" +
                        "  PRIMARY KEY (ival,pval)\n" +
                        ");\n";

        // build up a project builder for the workload
        VoltProjectBuilder project = new VoltProjectBuilder();
        project.addLiteralSchema(schema);
        project.addPartitionInfo("PARTITIONED", "pval");
        project.addStmtProcedure("dummy", "select * from REPLICATED;");
        boolean success;

        /////////////////////////////////////////////////////////////
        // CONFIG #1: 2 Local Site/Partitions running on JNI backend
        /////////////////////////////////////////////////////////////
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder

        VoltServerConfig config = null;
        MultiConfigSuiteBuilder builder =
            new MultiConfigSuiteBuilder(TestGiantDeleteSuite.class);

        VoltProjectBuilder project = new VoltProjectBuilder();
        project.addSchema(Insert.class.getResource("giant-delete-ddl.sql"));
        project.addProcedures(PROCEDURES);
        project.addStmtProcedure("Delete", "DELETE FROM ASSET WHERE ASSET_ID > -1;");

        config = new LocalCluster("giantdelete-onesite.jar", 2, 1, 0, BackendTarget.NATIVE_EE_JNI);
        config.compile(project);
        builder.addServerConfig(config);
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder

    static public junit.framework.Test suite()
    {
        VoltServerConfig config = null;
        MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestJoinsSuite.class);
        VoltProjectBuilder project = new VoltProjectBuilder();

        project.addSchema(TestJoinsSuite.class.getResource("testjoins-ddl.sql"));
        project.addStmtProcedure("InsertR1", "INSERT INTO R1 VALUES(?, ?, ?);");
        project.addStmtProcedure("InsertR2", "INSERT INTO R2 VALUES(?, ?);");
        project.addStmtProcedure("InsertR3", "INSERT INTO R3 VALUES(?, ?);");
        project.addStmtProcedure("InsertP1", "INSERT INTO P1 VALUES(?, ?);");
        project.addStmtProcedure("InsertP2", "INSERT INTO P2 VALUES(?, ?);");
        project.addStmtProcedure("InsertP3", "INSERT INTO P3 VALUES(?, ?);");
        /*
        config = new LocalCluster("testunion-onesite.jar", 1, 1, 0, BackendTarget.NATIVE_EE_JNI);
        if (!config.compile(project)) fail();
        builder.addServerConfig(config);
        */
 
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder

        String simpleSchema =
                "create table blah (" +
                "ival bigint default 0 not null, " +
                "PRIMARY KEY(ival));";

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

        cluster = new LocalCluster("collect.jar",
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder

        String schemaPath = schemaFile.getPath();
        schemaPath = URLEncoder.encode(schemaPath, "UTF-8");

        VoltDB.Configuration config = new VoltDB.Configuration();

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addSchema(schemaPath);
        builder.addPartitionInfo("blah", "ival");
        builder.addStmtProcedure("Insert", "insert into blah values (?,?,?,?,?);");
        builder.addProcedures(CrazyBlahProc.class);
        builder.setHTTPDPort(8095);
        boolean success = builder.compile(Configuration.getPathToCatalogForTest("json.jar"), 1, 1, 0, 21213, true);
        assertTrue(success);

        config.m_pathToCatalog = config.setPathToCatalogForTest("json.jar");
        config.m_pathToDeployment = builder.getPathToDeployment();

        server = new ServerThread(config);
        server.start();
        server.waitForInitialization();
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.