Package org.lilyproject.repository.api

Examples of org.lilyproject.repository.api.TableManager.createTable()


                new RecordFactoryImpl(), hbaseTableFactory, blobManager, configuration, repositoryModel);

        TableManager repoTableManager =
                new TableManagerImpl(/* TODO multiple repositories */ "default", configuration, hbaseTableFactory);
        if (!repoTableManager.tableExists(Table.RECORD.name)) {
            repoTableManager.createTable(Table.RECORD.name);
        }

        repository = (Repository) repositoryManager.getDefaultRepository().getDefaultTable();
        table = repository.getDefaultTable();
    }
View Full Code Here


    @Override
    public Object createTable(String repository, AvroTableCreateDescriptor tableCreateDescriptor)
            throws AvroInterruptedException, AvroIOException, AvroRepositoryException {
        try {
            TableManager tableMgr = repositoryManager.getRepository(repository).getTableManager();
            tableMgr.createTable(converter.convert(tableCreateDescriptor));
            return null;
        } catch (InterruptedException e) {
            throw converter.convert(e);
        } catch (IOException e) {
            throw converter.convert(e);
View Full Code Here

        List<RepositoryTable> tables = tableManager.getTables();
        assertEquals(1, tables.size());
        assertEquals("record", tables.get(0).getName());

        tableManager.createTable("foo");

        assertEquals(2, tableManager.getTables().size());

        assertTrue(tableManager.tableExists("foo"));
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.