Examples of addPartitionInfo()


Examples of org.voltdb.compiler.VoltProjectBuilder.addPartitionInfo()

    public void testAddTable() throws IOException {
        // Start with table A.
        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema("CREATE TABLE A (C1 BIGINT NOT NULL, PRIMARY KEY(C1));");
        builder.addPartitionInfo("A", "C1");
        builder.addProcedures(org.voltdb.catalog.ProcedureA.class);
        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();
        builder.compile(testDir + File.separator + "testaddtable1.jar");
        Catalog catOriginal = catalogForJar(testDir + File.separator + "testaddtable1.jar");
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addPartitionInfo()

            "ival bigint default 0 not null, " +
            "PRIMARY KEY(ival));";

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema(simpleSchema);
        builder.addPartitionInfo("blah", "ival");
        builder.addStmtProcedure("Insert", "insert into blah values (?);", null);
        builder.setHTTPDPort(8080);
        builder.setJSONAPIEnabled(true);
        boolean success = builder.compile(Configuration.getPathToCatalogForTest("rejoin.jar"), 1, 1, 0);
        assert(success);
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addPartitionInfo()

        builder.compile(testDir + File.separator + "testaddtable1.jar");
        Catalog catOriginal = catalogForJar(testDir + File.separator + "testaddtable1.jar");

        // Add table B and recompile
        builder.addLiteralSchema("CREATE TABLE B (C1 BIGINT NOT NULL, PRIMARY KEY(C1));");
        builder.addPartitionInfo("B", "C1");
        builder.addProcedures(org.voltdb.catalog.ProcedureB.class);
        builder.compile(testDir + File.separator + "testaddtable2.jar");
        Catalog catUpdated = catalogForJar(testDir + File.separator + "testaddtable2.jar");

        verifyDiff(catOriginal, catUpdated, false, null);
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addPartitionInfo()

    public void testDropTable() throws IOException {
        // Start with table A and B.
        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema("\nCREATE TABLE A (C1 BIGINT NOT NULL, PRIMARY KEY(C1));" +
                                 "\nCREATE TABLE B (C1 BIGINT NOT NULL, PRIMARY KEY(C1));");
        builder.addPartitionInfo("A", "C1");
        builder.addPartitionInfo("B", "C1");
        builder.addProcedures(org.voltdb.catalog.ProcedureA.class,
                              org.voltdb.catalog.ProcedureB.class);
        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();
        builder.compile(testDir + File.separator  + "testdroptable1.jar");
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addPartitionInfo()

        // Start with table A and B.
        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema("\nCREATE TABLE A (C1 BIGINT NOT NULL, PRIMARY KEY(C1));" +
                                 "\nCREATE TABLE B (C1 BIGINT NOT NULL, PRIMARY KEY(C1));");
        builder.addPartitionInfo("A", "C1");
        builder.addPartitionInfo("B", "C1");
        builder.addProcedures(org.voltdb.catalog.ProcedureA.class,
                              org.voltdb.catalog.ProcedureB.class);
        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();
        builder.compile(testDir + File.separator  + "testdroptable1.jar");
        Catalog catOriginal = catalogForJar(testDir + File.separator + "testdroptable1.jar");
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addPartitionInfo()

        // Start with table A.
        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema("\nCREATE TABLE A (C1 BIGINT NOT NULL, C2 BIGINT NOT NULL);");
        builder.addLiteralSchema("\nCREATE VIEW MATVIEW(C1, NUM) AS SELECT C1, COUNT(*) FROM A GROUP BY C1;");
        builder.addPartitionInfo("A", "C1");
        boolean success = builder.compile(testDir + File.separator + "convertmatview1.jar");
        assertTrue(success);
        Catalog catOriginal = catalogForJar(testDir + File.separator + "convertmatview1.jar");

        // Add table B and recompile
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addPartitionInfo()

        // Add table B and recompile
        builder = new VoltProjectBuilder();
        builder.addLiteralSchema("\nCREATE TABLE A (C1 BIGINT NOT NULL, C2 BIGINT NOT NULL);");
        builder.addLiteralSchema("\nCREATE TABLE MATVIEW(C1 BIGINT NOT NULL, NUM INTEGER);");
        builder.addPartitionInfo("A", "C1");
        success = builder.compile(testDir + File.separator + "convertmatview1.jar");
        assertTrue(success);
        Catalog catUpdated = catalogForJar(testDir + File.separator + "convertmatview1.jar");

        verifyDiffRejected(catOriginal, catUpdated);
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addPartitionInfo()

        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();

        // start with a table
        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema("\nCREATE TABLE A (C1 BIGINT NOT NULL, C2 BIGINT         , PRIMARY KEY(C1));");
        builder.addPartitionInfo("A", "C1");
        builder.addProcedures(org.voltdb.catalog.ProcedureA.class);
        builder.compile(testDir + File.separator + "testAddNonNullity1.jar");
        Catalog catOriginal = catalogForJar(testDir + File.separator + "testAddNonNullity1.jar");

        // add a non-null constraint
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addPartitionInfo()

        Catalog catOriginal = catalogForJar(testDir + File.separator + "testAddNonNullity1.jar");

        // add a non-null constraint
        builder = new VoltProjectBuilder();
        builder.addLiteralSchema("\nCREATE TABLE A (C1 BIGINT NOT NULL, C2 BIGINT NOT NULL, PRIMARY KEY(C1));");
        builder.addPartitionInfo("A", "C1");
        builder.addProcedures(org.voltdb.catalog.ProcedureA.class);
        builder.compile(testDir + File.separator + "testAddNonNullity2.jar");
        Catalog catUpdated = catalogForJar(testDir + File.separator + "testAddNonNullity2.jar");

        verifyDiffRejected(catOriginal, catUpdated);
View Full Code Here

Examples of org.voltdb.compiler.VoltProjectBuilder.addPartitionInfo()

        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();

        // start with a table
        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addLiteralSchema("\nCREATE TABLE A (C1 BIGINT NOT NULL, C2 BIGINT NOT NULL, PRIMARY KEY(C1));");
        builder.addPartitionInfo("A", "C1");
        builder.addProcedures(org.voltdb.catalog.ProcedureA.class);
        builder.compile(testDir + File.separator + "testDropNonNullity1.jar");
        Catalog catOriginal = catalogForJar(testDir + File.separator + "testDropNonNullity1.jar");

        // add a non-null constraint
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.