Package com.foundationdb.server.service.session

Examples of com.foundationdb.server.service.session.Session


        }
    }

    @Override
    public long getOldestActiveGeneration() {
        Session session = sessionService.createSession();
        Throwable thrown = null;
        try {
            hook.hookFunctionIn(session, DXLFunction.GET_OLDEST_ACTIVE_GENERATION);
            return delegate.getOldestActiveGeneration();
        } catch (Throwable t) {
            thrown = t;
            hook.hookFunctionCatch(session, DXLFunction.GET_OLDEST_ACTIVE_GENERATION, t);
            throw throwAlways(t);
        } finally {
            try {
                hook.hookFunctionFinally(session, DXLFunction.GET_OLDEST_ACTIVE_GENERATION, thrown);
            } finally {
                session.close();
            }
        }
    }
View Full Code Here


        }
    }

    @Override
    public Set<Long> getActiveGenerations() {
        Session session = sessionService.createSession();
        Throwable thrown = null;
        try {
            hook.hookFunctionIn(session, DXLFunction.GET_ACTIVE_GENERATIONS);
            return delegate.getActiveGenerations();
        } catch (Throwable t) {
            thrown = t;
            hook.hookFunctionCatch(session, DXLFunction.GET_ACTIVE_GENERATIONS, t);
            throw throwAlways(t);
        } finally {
            try {
                hook.hookFunctionFinally(session, DXLFunction.GET_ACTIVE_GENERATIONS, thrown);
            } finally {
                session.close();
            }
        }
    }
View Full Code Here

        writeRow(o, 11, 1, "2012-01-01");

        Collection<String> indexesToUpdate = Collections.singleton("name_placed");
        ddl().updateTableStatistics(session(), TableName.create("schema", "customers"), indexesToUpdate);

        Session session = serviceManager().getSessionService().createSession();
        try {
            dropAllTables(session);
        }
        finally {
            session.close();
        }
    }
View Full Code Here

        ServerSession server = context.getServer();
        AkibanInformationSchema ais = server.getAIS();
        String schema = server.getDefaultSchemaName();
        logger.info("DDL in {}: {}", schema, sql);
        DDLFunctions ddlFunctions = server.getDXL().ddlFunctions();
        Session session = server.getSession();
        switch (ddl.getNodeType()) {
        case NodeTypes.CREATE_SCHEMA_NODE:
            SchemaDDL.createSchema(ais, schema, (CreateSchemaNode)ddl, context);
            return;
        case NodeTypes.DROP_SCHEMA_NODE:
View Full Code Here

        if(ddl.getNodeType() == NodeTypes.CREATE_TABLE_NODE && ((CreateTableNode)ddl).getQueryExpression() != null){
            try{
                preExecute(context, DXLFunction.UNSPECIFIED_DDL_WRITE);
                String schema = server.getDefaultSchemaName();
                DDLFunctions ddlFunctions = server.getDXL().ddlFunctions();
                Session session = server.getSession();
                List<DataTypeDescriptor> descriptors = new ArrayList<>();
                for(PostgresType columnType: columnTypes){
                    descriptors.add(columnType.getType().dataTypeDescriptor());
                }
View Full Code Here

    @Override
    public int execute(PostgresQueryContext context, QueryBindings bindings, int maxrows) throws IOException {
        context.initStore(schema);
        PostgresServerSession server = context.getServer();
        Session session = server.getSession();
        ExternalDataService externalData = server.getExternalDataService();
        InputStream istr;
        long nrows = 0;
        if (fromFile != null)
            istr = new FileInputStream(fromFile);
View Full Code Here

    {
        @Override
        public void run()
        {
            try {
                Session session = createNewSession();
                txnService().beginTransaction(session);
                try {
                    System.out.println(String.format("(%s, %s), %s: Starting", id, u, session));
                    barrier.await();
                    System.out.println(String.format("(%s, %s), %s: About to write", id, u, session));
View Full Code Here

            this.tableCount = expectedCount;
        }

        @Override
        public void run() {
            Session session = createNewSession();
            try {
                txnService().beginTransaction(session);
                AkibanInformationSchema ais = ddl().getAIS(session);
                b1.await();
                assertEquals("Table count (session 2)", tableCount, ais.getTables().size());
                b2.await();
                txnService().commitTransaction(session);
            } catch(Exception e) {
                throw new RuntimeException(e);
            } finally {
                txnService().rollbackTransactionIfOpen(session);
                session.close();
            }
        }
View Full Code Here

        this.txnService().commitTransaction(this.session());
    }

    @Before
    public void start() {
        Session session = this.session();
        this.txnService().beginTransaction(session);
    }
View Full Code Here

    private DeleteGenerator deleteGenerator;
    public static final String SCHEMA = "test";

    @Before
    public void start() {
        Session session = this.session();
        this.txnService().beginTransaction(session);
    }
View Full Code Here

TOP

Related Classes of com.foundationdb.server.service.session.Session

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.