Package org.voltdb.utils

Examples of org.voltdb.utils.InMemoryJarfile$JarLoader


        // @UpdateClasses should be rejected
        assertFalse(findClassInSystemCatalog("org.voltdb_testprocs.fullddlfeatures.testImportProc"));
        threw = false;
        try {
            InMemoryJarfile jarfile = new InMemoryJarfile();
            VoltCompiler comp = new VoltCompiler();
            comp.addClassToJar(jarfile, org.voltdb_testprocs.fullddlfeatures.testImportProc.class);
            m_client.callProcedure("@UpdateClasses", jarfile.getFullJarBytes(), null);
        }
        catch (ProcCallException pce) {
            threw = true;
            assertTrue(pce.getMessage().contains("@UpdateClasses is forbidden"));
        }
View Full Code Here


        // And so should adhoc queries
        verifyAdhocQuery();

        // Also, @UpdateClasses should only work with adhoc DDL
        assertFalse(findClassInSystemCatalog("org.voltdb_testprocs.fullddlfeatures.testImportProc"));
        InMemoryJarfile jarfile = new InMemoryJarfile();
        VoltCompiler comp = new VoltCompiler();
        comp.addClassToJar(jarfile, org.voltdb_testprocs.fullddlfeatures.testImportProc.class);
        try {
            m_client.callProcedure("@UpdateClasses", jarfile.getFullJarBytes(), null);
        }
        catch (ProcCallException pce) {
            fail("Should be able to call @UpdateClasses when adhoc DDL enabled.");
        }
        assertTrue(findClassInSystemCatalog("org.voltdb_testprocs.fullddlfeatures.testImportProc"));
View Full Code Here

            // @UpdateClasses should be rejected
            assertFalse(findClassInSystemCatalog("org.voltdb_testprocs.fullddlfeatures.testImportProc"));
            threw = false;
            try {
                InMemoryJarfile jarfile = new InMemoryJarfile();
                VoltCompiler comp = new VoltCompiler();
                comp.addClassToJar(jarfile, org.voltdb_testprocs.fullddlfeatures.testImportProc.class);
                m_client.callProcedure("@UpdateClasses", jarfile.getFullJarBytes(), null);
            }
            catch (ProcCallException pce) {
                threw = true;
                assertTrue(pce.getMessage().contains("Write procedure @UpdateClasses is not allowed"));
            }
View Full Code Here

            // @UpdateClasses should be rejected
            assertFalse(findClassInSystemCatalog("org.voltdb_testprocs.fullddlfeatures.testImportProc"));
            threw = false;
            try {
                InMemoryJarfile jarfile = new InMemoryJarfile();
                VoltCompiler comp = new VoltCompiler();
                comp.addClassToJar(jarfile, org.voltdb_testprocs.fullddlfeatures.testImportProc.class);
                m_client.callProcedure("@UpdateClasses", jarfile.getFullJarBytes(), null);
            }
            catch (ProcCallException pce) {
                threw = true;
                assertTrue(pce.getMessage().contains("Write procedure @UpdateClasses is not allowed"));
            }
View Full Code Here

            "export table Export1;" +
            "create procedure sample as select * from Table1;";
        VoltCompiler c = compileForDDLTest2(schema);
        System.out.println(c.getCatalog().serialize());
        JdbcDatabaseMetaDataGenerator dut =
            new JdbcDatabaseMetaDataGenerator(c.getCatalog(), new InMemoryJarfile(testout_jar));
        VoltTable tables = dut.getMetaData("tables");
        System.out.println(tables);
        assertEquals(10, tables.getColumnCount());
        assertEquals(4, tables.getRowCount());
        assertTrue(VoltTableTestHelpers.moveToMatchingRow(tables, "TABLE_NAME", "Table1"));
View Full Code Here

            "create procedure sample as select * from Table1;";

        VoltCompiler c = compileForDDLTest2(schema);
        System.out.println(c.getCatalog().serialize());
        JdbcDatabaseMetaDataGenerator dut =
            new JdbcDatabaseMetaDataGenerator(c.getCatalog(), new InMemoryJarfile(testout_jar));
        VoltTable columns = dut.getMetaData("ColUmns");
        System.out.println(columns);
        assertEquals(23, columns.getColumnCount());
        assertEquals(13, columns.getRowCount());
        for (Map.Entry<String, Object[]> entry : refcolumns.entrySet())
View Full Code Here

            "create procedure sample as select * from Table1;";

        VoltCompiler c = compileForDDLTest2(schema);
        System.out.println(c.getCatalog().serialize());
        JdbcDatabaseMetaDataGenerator dut =
            new JdbcDatabaseMetaDataGenerator(c.getCatalog(), new InMemoryJarfile(testout_jar));
        VoltTable indexes = dut.getMetaData("IndexInfo");
        System.out.println(indexes);
        assertEquals(13, indexes.getColumnCount());
        assertEquals(7, indexes.getRowCount());
        assertTrue(VoltTableTestHelpers.moveToMatchingTupleRow(indexes, "INDEX_NAME", "INDEX1_TREE", "COLUMN_NAME", "Column2"));
View Full Code Here

            "create procedure sample as select * from Table1;";

        VoltCompiler c = compileForDDLTest2(schema);
        System.out.println(c.getCatalog().serialize());
        JdbcDatabaseMetaDataGenerator dut =
            new JdbcDatabaseMetaDataGenerator(c.getCatalog(), new InMemoryJarfile(testout_jar));
        VoltTable pkeys = dut.getMetaData("PrimaryKeys");
        System.out.println(pkeys);
        assertEquals(6, pkeys.getColumnCount());
        assertEquals(4, pkeys.getRowCount());
        assertTrue(VoltTableTestHelpers.moveToMatchingRow(pkeys, "COLUMN_NAME", "Column1"));
View Full Code Here

            "create procedure proc2 as select * from Table1 where Column2=?;";

        VoltCompiler c = compileForDDLTest2(schema);
        System.out.println(c.getCatalog().serialize());
        JdbcDatabaseMetaDataGenerator dut =
            new JdbcDatabaseMetaDataGenerator(c.getCatalog(), new InMemoryJarfile(testout_jar));
        VoltTable params = dut.getMetaData("ProcedureColumns");
        System.out.println(params);
        assertEquals(20, params.getColumnCount());
        assertEquals(4, params.getRowCount()); // 2 real and 2 crud inserts
        assertTrue(VoltTableTestHelpers.moveToMatchingRow(params, "PROCEDURE_NAME", "proc1"));
View Full Code Here

            "partition procedure proc1 on table Table1 column Column1;" +
            "create procedure proc2 as select * from Table1 where Column2=?;";

        VoltCompiler c = compileForDDLTest2(schema);
        JdbcDatabaseMetaDataGenerator dut =
            new JdbcDatabaseMetaDataGenerator(c.getCatalog(), new InMemoryJarfile(testout_jar));
        VoltTable typeInfo = dut.getMetaData("typEINfo");
        System.out.println(typeInfo);
        // just do some minor sanity checks on size of table and that it contains the types
        // we expect
        HashMap<String, VoltType> expectedTypes = new HashMap<String, VoltType>();
View Full Code Here

TOP

Related Classes of org.voltdb.utils.InMemoryJarfile$JarLoader

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.