Package org.voltdb.compiler

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


        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, false);
View Full Code Here


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

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addSchema(schemaPath);
        builder.addPartitionInfo("HELLOWORLD", "DIALECT");
        builder.addStmtProcedure("Insert", "insert into HELLOWORLD values (?,?,?);");
        builder.addStmtProcedure("Select", "select * from HELLOWORLD;");
        builder.addProcedures(SelectStarHelloWorld.class);
        builder.setHTTPDPort(8095);
View Full Code Here

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

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addSchema(schemaPath);
        builder.addPartitionInfo("HELLOWORLD", "DIALECT");

        GroupInfo gi = new GroupInfo("foo", true, false, true, true, false, false);
        builder.addGroups(new GroupInfo[] { gi } );
View Full Code Here

        }

        // ENG-963 below here
        // do enough to get a new deployment file
        VoltProjectBuilder builder2 = new VoltProjectBuilder();
        builder2.addSchema(schemaPath);
        builder2.addPartitionInfo("HELLOWORLD", "DIALECT");

        // Same groups
        builder2.addGroups(new GroupInfo[] { gi } );
View Full Code Here

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

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addSchema(schemaPath);
        builder.addPartitionInfo("HELLOWORLD", "DIALECT");

        builder.addStmtProcedure("Insert", "insert into HELLOWORLD values (?,?,?);");

        builder.setHTTPDPort(8095);
View Full Code Here

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

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addSchema(schemaPath);
        builder.addPartitionInfo("foo", "bar");
        builder.addProcedures(DelayProc.class);
        builder.setHTTPDPort(8095);
        boolean success = builder.compile(Configuration.getPathToCatalogForTest("json.jar"));
        assertTrue(success);
View Full Code Here

        final short W_ID = 3;
        final byte D_ID = 7;
        final int C_ID = 42;

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addSchema(TPCCProjectBuilder.ddlURL);
        for (String pair[] : TPCCProjectBuilder.partitioning) {
            builder.addPartitionInfo(pair[0], pair[1]);
        }
        builder.addStmtProcedure("InsertCustomer", "INSERT INTO CUSTOMER VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);", "CUSTOMER.C_W_ID: 2");
        builder.addStmtProcedure("Fake1", "SELECT C_ID, C_FIRST, C_MIDDLE, C_LAST, C_STREET_1, C_STREET_2, C_CITY, C_STATE, C_ZIP, C_PHONE, C_SINCE, C_CREDIT, C_CREDIT_LIM, C_DISCOUNT, C_BALANCE, C_YTD_PAYMENT, C_PAYMENT_CNT, C_DATA FROM CUSTOMER WHERE C_LAST = ? AND C_D_ID = ? AND C_W_ID = ? ORDER BY C_FIRST;");
View Full Code Here

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

        VoltProjectBuilder builder = new VoltProjectBuilder();
        builder.addSchema(schemaPath);
        builder.addPartitionInfo("dummy", "sval1");
        builder.addStmtProcedure("Insert", "insert into dummy values (?,?,?);");
        builder.addStmtProcedure("Select", "select * from dummy;");
        builder.setHTTPDPort(8095);
        boolean success = builder.compile(Configuration.getPathToCatalogForTest("jsonperf.jar"), 1, 1, 0);
View Full Code Here

            hosts = 1;
            k_factor = 0;
        }

        builder = new VoltProjectBuilder();
        builder.addSchema(SimpleServer.class.getResource(schemaFileName));
        builder.setCompilerDebugPrintStream(System.out);

        if (!builder.compile(Configuration.getPathToCatalogForTest("simple.jar"), sites, hosts, k_factor)) {
            System.err.println("Compilation failed");
            System.exit(-1);
View Full Code Here

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

        VoltProjectBuilder project = new VoltProjectBuilder();
        project.addSchema(TestIndexOverflowSuite.class.getResource("indexoverflowsuite-ddl.sql"));
        project.addPartitionInfo("P1", "ID");
        project.addStmtProcedure("BasicEQParam",           "select * from P1 where ID = ?");
        project.addStmtProcedure("BasicGTParam",           "select * from P1 where ID > ?");
        project.addStmtProcedure("BasicLTParam",           "select * from P1 where ID < ?");

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.