Package org.voltdb.catalog

Examples of org.voltdb.catalog.Catalog


                    hostLog.info("Query timeout set to " + sysType.getQuery().getTimeout() + " milliseconds");
                }
            }

            // create a dummy catalog to load deployment info into
            Catalog catalog = new Catalog();
            Cluster cluster = catalog.getClusters().add("cluster");
            Database db = cluster.getDatabases().add("database");

            // create groups as needed for users
            if (m_deployment.getUsers() != null) {
                for (UsersType.User user : m_deployment.getUsers().getUser()) {
View Full Code Here


        byte[] bytes = MiscUtils.fileToBytes(cat);
        String serializedCat =
            CatalogUtil.getSerializedCatalogStringFromJar(CatalogUtil.loadAndUpgradeCatalogFromJar(bytes).getFirst());
        assertNotNull(serializedCat);
        Catalog catalog = new Catalog();
        catalog.execute(serializedCat);

        String deploymentPath = builder.getPathToDeployment();
        CatalogUtil.compileDeployment(catalog, deploymentPath, true, false);

        m_context = new CatalogContext(0, 0, catalog, bytes, null, 0, 0);
View Full Code Here

        }
    }

    public void testNullAnnotation() throws IOException {

        Catalog catalog  = new TPCCProjectBuilder().createTPCCSchemaCatalog();
        Database catalog_db = catalog.getClusters().get("cluster").getDatabases().get("database");

        for(Table t : catalog_db.getTables()) {
            assertNotNull(((TableAnnotation)t.getAnnotation()).ddl);
        }
    }
View Full Code Here

            start = end;
        }*/

        byte[] bytes = MiscUtils.fileToBytes(new File("tpcc-oop.jar"));
        String serializedCatalog = CatalogUtil.getSerializedCatalogStringFromJar(CatalogUtil.loadAndUpgradeCatalogFromJar(bytes).getFirst());
        Catalog catalog = new Catalog();
        catalog.execute(serializedCatalog);
        CatalogContext context = new CatalogContext(0, 0, catalog, bytes, null, 0, 0);

        m_pt = new PlannerTool(context.cluster, context.database, 0);

        AdHocPlannedStatement result = null;
View Full Code Here

        jar.deleteOnExit();
        builder.compile("testbadddl-oop.jar");
        byte[] bytes = MiscUtils.fileToBytes(new File("testbadddl-oop.jar"));
        String serializedCatalog = CatalogUtil.getSerializedCatalogStringFromJar(CatalogUtil.loadAndUpgradeCatalogFromJar(bytes).getFirst());
        assertNotNull(serializedCatalog);
        Catalog c = new Catalog();
        c.execute(serializedCatalog);
        CatalogContext context = new CatalogContext(0, 0, c, bytes, null, 0, 0);

        m_pt = new PlannerTool(context.cluster, context.database, 0);

        // Bad DDL would kill the planner before it starts and this query
View Full Code Here

            byte[] catalogBytes,
            String diffCommands,
            boolean incrementVersion,
            byte[] deploymentHash)
    {
        Catalog newCatalog = catalog.deepCopy();
        newCatalog.execute(diffCommands);
        int incValue = incrementVersion ? 1 : 0;
        byte[] realDepCRC = deploymentHash != null ? deploymentHash : this.deploymentHash;
        // If there's no new catalog bytes, preserve the old one rather than
        // bashing it
        byte[] bytes = catalogBytes;
View Full Code Here

        byte[] bytes = MiscUtils.fileToBytes(new File(catalogJar));
        String serializedCatalog = CatalogUtil.getSerializedCatalogStringFromJar(CatalogUtil.loadAndUpgradeCatalogFromJar(bytes).getFirst());
        assert(serializedCatalog != null);

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

        return catalog;
    }
View Full Code Here

    public String[] compileAllCatalogs(int sitesPerHost,
                                       int length,
                                       int kFactor,
                                       String voltRoot) {
        addAllDefaults();
        Catalog catalog = compile(m_jarFileName, sitesPerHost,
                                  length, kFactor, voltRoot);
        if (catalog == null) {
            throw new RuntimeException("Bingo project builder failed app compilation.");
        }
        return new String[] {m_jarFileName};
View Full Code Here

        addDefaultSchema();
        addDefaultPartitioning();
        addDefaultProcedures();

        Catalog catalog = compile(catalogJar, 1, 1, 0, null);
        assert(catalog != null);
        return catalog;
    }
View Full Code Here

        List<VoltCompilerReader> autogenReaderList = new ArrayList<VoltCompilerReader>(1);
        autogenReaderList.add(new VoltCompilerJarFileReader(origJarFile, AUTOGEN_DDL_FILE_NAME));
        DatabaseType autoGenDatabase = getProjectDatabase(null);
        InMemoryJarfile autoGenJarOutput = new InMemoryJarfile();
        autoGenCompiler.m_currentFilename = AUTOGEN_DDL_FILE_NAME;
        Catalog autoGenCatalog = autoGenCompiler.compileCatalogInternal(autoGenDatabase,
                autogenReaderList, autoGenJarOutput);
        FilteredCatalogDiffEngine diffEng = new FilteredCatalogDiffEngine(origCatalog, autoGenCatalog);
        String diffCmds = diffEng.commands();
        if (diffCmds != null && !diffCmds.equals("")) {
            VoltDB.crashLocalVoltDB("Catalog Verification from Generated DDL failed!");
View Full Code Here

TOP

Related Classes of org.voltdb.catalog.Catalog

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.