Package org.lilyproject.repository.api

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


        try {
            TableManager tableManager = getRepository(uriInfo).getTableManager();
            if (!tableManager.tableExists(tableName)) {
                throw new ResourceException("Table '" + tableName + "' not found", NOT_FOUND.getStatusCode());
            }
            tableManager.dropTable(tableName);
            return Response.ok().build();
        } catch (IOException ioe) {
            throw new ResourceException("Error dropping table '" + tableName + "'", ioe,
                    INTERNAL_SERVER_ERROR.getStatusCode());
        } catch (InterruptedException ie) {
View Full Code Here


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

    @Test(expected = Exception.class)
    public void testRecordTableCannotBeDeleted() throws Exception {
        String repositoryName = "testRecordTableCannotBeDeleted";
        TableManager tableManager = repositoryManager.getRepository(repositoryName).getTableManager();
        tableManager.dropTable("record");
    }

    @Test
    public void testBasicTableManagement() throws Exception {
        String repositoryName = "tablemgmttest";
View Full Code Here

        assertTrue(tableManager.tableExists("foo"));

        repository.getTable("foo");

        tableManager.dropTable("foo");

        assertEquals(1, tableManager.getTables().size());
    }
}
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.