Package org.voltdb.catalog

Examples of org.voltdb.catalog.Catalog.serialize()


            LOG.error("VoltCompiler had " + m_errors.size() + " errors\n" + StringUtil.join("\n", m_errors));
            return (false);
        }

        // WRITE CATALOG TO JAR HERE
        final String catalogCommands = catalog.serialize();

        byte[] catalogBytes = null;
        try {
            catalogBytes =  catalogCommands.getBytes("UTF-8");
        } catch (final UnsupportedEncodingException e1) {
View Full Code Here


        final File schemaFile = VoltProjectBuilder.writeStringToTempFile(deploymentContent);
        final String depPath = schemaFile.getPath();

        CatalogUtil.compileDeployment(catalog, depPath, false, false);

        String commands = catalog.serialize();
        System.out.println(commands);

    }

    public void testCatalogVersionCheck() {
View Full Code Here

    public void testSimplest() throws IOException
    {
        Catalog catalog1 = TPCCProjectBuilder.getTPCCSchemaCatalog();

        String commands = catalog1.serialize();
        // System.out.println(commands);

        Catalog catalog2 = new Catalog();
        try {
            catalog2.execute(commands);
View Full Code Here

        try {
            catalog2.execute(commands);
        } catch (Exception e) {
            e.printStackTrace();
        }
        String commands2 = catalog2.serialize();

        Catalog catalog3 = catalog2.deepCopy();
        String commands3 = catalog3.serialize();

        assertTrue(commands.equals(commands2));
View Full Code Here

            e.printStackTrace();
        }
        String commands2 = catalog2.serialize();

        Catalog catalog3 = catalog2.deepCopy();
        String commands3 = catalog3.serialize();

        assertTrue(commands.equals(commands2));
        assertTrue(commands.equals(commands3));

        assertTrue(catalog1.equals(catalog2));
View Full Code Here

        final String catalogContents = VoltCompilerUtils.readFileFromJarfile(testout_jar, "catalog.txt");

        final Catalog c2 = new Catalog();
        c2.execute(catalogContents);

        assertTrue(c2.serialize().equals(c1.serialize()));
    }

    public void testProcWithBoxedParam() throws IOException {
        final String simpleSchema =
            "create table books (cash integer default 23, title varchar(3) default 'foo', PRIMARY KEY(cash));";
View Full Code Here

        final String projectPath = projectFile.getPath();

        final VoltCompiler compiler1 = new VoltCompiler();
        final VoltCompiler compiler2 = new VoltCompiler();
        final Catalog catalog = compileCatalogFromProject(compiler1, projectPath);
        final String cat1 = catalog.serialize();
        final boolean success = compiler2.compileWithProjectXML(projectPath, testout_jar);
        final String cat2 = VoltCompilerUtils.readFileFromJarfile(testout_jar, "catalog.txt");

        assertTrue(success);
        assertTrue(cat1.compareTo(cat2) == 0);
View Full Code Here

        final String catalogContents = VoltCompilerUtils.readFileFromJarfile(testout_jar, "catalog.txt");

        final Catalog c2 = new Catalog();
        c2.execute(catalogContents);

        assertTrue(c2.serialize().equals(c1.serialize()));
    }

    public void testOverrideProcInfo() throws IOException {
        final String simpleSchema =
            "create table books (cash integer default 23 not null, title varchar(3) default 'foo', PRIMARY KEY(cash));" +
View Full Code Here

        assertTrue(success);
        final Catalog c1 = compiler.getCatalog();
        final String catalogContents = VoltCompilerUtils.readFileFromJarfile(testout_jar, "catalog.txt");
        final Catalog c2 = new Catalog();
        c2.execute(catalogContents);
        assertTrue(c2.serialize().equals(c1.serialize()));
    }


    public void testVarbinary() throws IOException {
        final String simpleSchema =
View Full Code Here

        assertTrue(success);
        final Catalog c1 = compiler.getCatalog();
        final String catalogContents = VoltCompilerUtils.readFileFromJarfile(testout_jar, "catalog.txt");
        final Catalog c2 = new Catalog();
        c2.execute(catalogContents);
        assertTrue(c2.serialize().equals(c1.serialize()));
    }


    public void testDdlProcVarbinary() throws IOException {
        final String simpleSchema =
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.