Examples of TPCCProjectBuilder


Examples of org.voltdb.benchmark.tpcc.TPCCProjectBuilder

        builder.setGlobalConfParameter("site.specexec_enable", true);
        builder.setGlobalConfParameter("site.specexec_nonblocking", true);
        builder.setGlobalConfParameter("site.txn_profiling", true);

        // build up a project builder for the TPC-C app
        TPCCProjectBuilder project = new TPCCProjectBuilder();
        project.addAllDefaults();
        project.addStmtProcedure("GetItemIndex", "SELECT * FROM " + TPCCConstants.TABLENAME_ITEM + " WHERE I_ID = ?");
        project.addStmtProcedure("GetItemNoIndex", "SELECT * FROM " + TPCCConstants.TABLENAME_ITEM + " LIMIT 1");

        VoltServerConfig config;
        boolean success;

        /////////////////////////////////////////////////////////////
View Full Code Here

Examples of org.voltdb.benchmark.tpcc.TPCCProjectBuilder

        VoltServerConfig config = null;
        // the suite made here will all be using the tests from this class
        MultiConfigSuiteBuilder builder = new MultiConfigSuiteBuilder(TestTPCCSuite.class);

        // build up a project builder for the TPC-C app
        TPCCProjectBuilder project = new TPCCProjectBuilder();
        //project.setBackendTarget(BackendTarget.NATIVE_EE_IPC);
        project.addDefaultSchema();
        project.addDefaultProcedures();
        project.addDefaultPartitioning();
        project.addSupplementalClasses(SUPPLEMENTALS);

        /////////////////////////////////////////////////////////////
        // CONFIG #1: 1 Local Site/Partition running on JNI backend
        /////////////////////////////////////////////////////////////
        config = new LocalCluster("tpcc.jar", 3, 1, 0, BackendTarget.NATIVE_EE_JNI);
View Full Code Here

Examples of org.voltdb.benchmark.tpcc.TPCCProjectBuilder

        // get a server config for the native backend with one sites/partitions
        VoltServerConfig config = new LocalCluster("distregression-onesite.jar", 1, 1, 0, BackendTarget.NATIVE_EE_JNI);

        // build up a project builder for the workload
        TPCCProjectBuilder project = new TPCCProjectBuilder();
        project.addDefaultSchema();
        project.addDefaultPartitioning();
        project.addProcedures(PROCEDURES);
        project.addStmtProcedure("InsertNewOrder", "INSERT INTO NEW_ORDER VALUES (?, ?, ?);", "NEW_ORDER.NO_W_ID: 2");
        // build the jarfile
        boolean success = config.compile(project);
        assertTrue(success);

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

Examples of org.voltdb.benchmark.tpcc.TPCCProjectBuilder

    protected String compileWithGroups(
            boolean securityEnabled, String securityProvider,
            GroupInfo[] gi, UserInfo[] ui,
            String name, Class<?>... procList) {
        TPCCProjectBuilder builder = new TPCCProjectBuilder();
        builder.addDefaultSchema();
        builder.addDefaultPartitioning();
        builder.addProcedures(procList);
        builder.setSecurityEnabled(securityEnabled);

        if (gi != null && gi.length > 0)
            builder.addGroups(gi);
        if (ui != null && ui.length > 0)
            builder.addUsers(ui);

        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();
        String retval = testDir + File.separator + "tpcc-catalogcheck-" + name + ".jar";
        builder.compile(retval);
        return retval;
    }
View Full Code Here

Examples of org.voltdb.benchmark.tpcc.TPCCProjectBuilder

        // compile a catalog
        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();
        String catalogJar = testDir + File.separator + JAR;

        TPCCProjectBuilder pb = new TPCCProjectBuilder();
        pb.addDefaultSchema();
        pb.addDefaultPartitioning();
        pb.addProcedures(MultiSiteSelect.class, InsertNewOrder.class);

        pb.compile(catalogJar, 2, 0);

        // load a catalog
        byte[] bytes = MiscUtils.fileToBytes(new File(catalogJar));
        String serializedCatalog =
            CatalogUtil.getSerializedCatalogStringFromJar(CatalogUtil.loadAndUpgradeCatalogFromJar(bytes).getFirst());

        // create the catalog (that will be passed to the ClientInterface
        catalog = new Catalog();
        catalog.execute(serializedCatalog);

        // update the catalog with the data from the deployment file
        String pathToDeployment = pb.getPathToDeployment();
        assertTrue(CatalogUtil.compileDeployment(catalog, pathToDeployment, true, false) >= 0);

        cluster = catalog.getClusters().get("cluster");
        CatalogMap<Procedure> procedures = cluster.getDatabases().get("database").getProcedures();
        Procedure insertProc = procedures.get("InsertNewOrder");
View Full Code Here

Examples of org.voltdb.benchmark.tpcc.TPCCProjectBuilder

                        0,
                        0,
                        "",
                        100,
                        new HashinatorConfig(HashinatorType.LEGACY, LegacyHashinator.getConfigureBytes(1), 0, 0));
        m_project = new TPCCProjectBuilder();
        m_catalog = m_project.createTPCCSchemaCatalog();
    }
View Full Code Here

Examples of org.voltdb.benchmark.tpcc.TPCCProjectBuilder

        int siteCount = 1;
        BackendTarget target = BackendTarget.NATIVE_EE_JNI;
        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();
        String catalogJar = testDir + File.separator + JAR;

        TPCCProjectBuilder pb = new TPCCProjectBuilder();
        pb.addDefaultSchema();
        pb.addDefaultPartitioning();
        pb.addProcedures(procedures);
        pb.addSupplementalClasses(SUPPLEMENTALS);
        pb.compile(catalogJar, siteCount, 0);

        // start VoltDB server using hzsqlsb backend
        server = new ServerThread(catalogJar, pb.getPathToDeployment(), target);
        server.start();
        server.waitForInitialization();

        ClientConfig clientConfig = new ClientConfig("program", "none");
        client = ClientFactory.createClient(clientConfig);
View Full Code Here

Examples of org.voltdb.benchmark.tpcc.TPCCProjectBuilder

     * This test tries to assign a user in the deployment file to a group that does not exist and asserts that
     * deployment file compilation fails.
     * @throws IOException
     */
    public void testCompileDeploymentAddUserToNonExistentGroup() throws IOException {
        TPCCProjectBuilder project = new TPCCProjectBuilder();
        project.addDefaultSchema();
        project.addDefaultPartitioning();
        project.addDefaultProcedures();

        project.setSecurityEnabled(true);
        GroupInfo groups[] = new GroupInfo[] {
                new GroupInfo("foo", false, false, false, false, false, false),
                new GroupInfo("blah", false, false, false, false, false, false)
        };
        project.addGroups(groups);
        UserInfo users[] = new UserInfo[] {
                new UserInfo("john", "hugg", new String[] {"foo"}),
                new UserInfo("ryan", "betts", new String[] {"foo", "bar"}),
                new UserInfo("ariel", "weisberg", new String[] {"bar"})
        };
        project.addUsers(users);

        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();
        String jarName = "compile-deployment.jar";
        String catalogJar = testDir + File.separator + jarName;
        assertTrue("Project failed to compile", project.compile(catalogJar));

        byte[] bytes = MiscUtils.fileToBytes(new File(catalogJar));
        String serializedCatalog = CatalogUtil.getSerializedCatalogStringFromJar(CatalogUtil.loadAndUpgradeCatalogFromJar(bytes).getFirst());
        assertNotNull("Error loading catalog from jar", serializedCatalog);

        Catalog catalog = new Catalog();
        catalog.execute(serializedCatalog);

        // this should fail because group "bar" does not exist
        assertTrue("Deployment file shouldn't have been able to validate",
                CatalogUtil.compileDeployment(catalog, project.getPathToDeployment(), true, true) < 0);
    }
View Full Code Here

Examples of org.voltdb.benchmark.tpcc.TPCCProjectBuilder

        if (args.length >= 2) {
            doCompile = args[1].equals("true");
        }

        if (doCompile) {
            TPCCProjectBuilder project = new TPCCProjectBuilder();
            project.addDefaultSchema();
            project.addDefaultProcedures();
            project.addDefaultPartitioning();
            project.setCompilerDebugPrintStream(System.out);
            if(!project.compile(config.m_pathToCatalog, partitions, 0)) {
                System.out.println("Compilation failed");
                System.exit(-1);
            }
        }
View Full Code Here

Examples of org.voltdb.benchmark.tpcc.TPCCProjectBuilder

        assertTrue(jar2.exists());
    }

    public void testCatalogAutoUpgradeFail() throws Exception
    {
        TPCCProjectBuilder project = new TPCCProjectBuilder();
        project.addDefaultSchema();
        project.addDefaultPartitioning();
        project.addDefaultProcedures();

        String testDir = BuildDirectoryUtils.getBuildDirectoryPath();
        String jarName = "compile-deployment.jar";
        String catalogJar = testDir + File.separator + jarName;
        assertTrue("Project failed to compile", project.compile(catalogJar));

        // Load the catalog to an in-memory jar and tweak the version to make it incompatible.
        byte[] bytes = MiscUtils.fileToBytes(new File(catalogJar));
        InMemoryJarfile memCatalog = CatalogUpgradeTools.loadCatalog(bytes, false);
        CatalogUpgradeTools.dorkVersion(memCatalog);
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.