Examples of AkibanInformationSchema


Examples of com.foundationdb.ais.model.AkibanInformationSchema

    public void start() {
        super.start();
        final boolean clearIncompatibleData = Boolean.parseBoolean(config.getProperty(CLEAR_INCOMPATIBLE_DATA_PROP));

        initSchemaManagerDirectory();
        this.memoryTableAIS = new AkibanInformationSchema();
        this.tableStatusCache = new FDBTableStatusCache(holder, txnService);

        try(Session session = sessionService.createSession()) {
            txnService.run(session, new Runnable() {
                @Override
                public void run() {
                    TransactionState txn = txnService.getTransaction(session);
                    Boolean isCompatible = isDataCompatible(txn, false);
                    if(isCompatible == Boolean.FALSE) {
                        if(!clearIncompatibleData) {
                            isDataCompatible(txn, true);
                            assert false; // Throw expected
                        }
                        LOG.warn("Clearing incompatible data directory: {}", rootDir.getPath());
                        // Delicate: Directory removal is safe as this is the first service started that consumes it.
                        //           Remove after the 1.9.2 release, which includes entry point for doing this.
                        rootDir.remove(txn.getTransaction()).get();
                        initSchemaManagerDirectory();
                        isCompatible = null;
                    }
                    if(isCompatible == null) {
                        saveInitialState(txn);
                    }
                    AkibanInformationSchema newAIS = loadFromStorage(session);
                    buildRowDefs(session, newAIS);
                    FDBSchemaManager.this.curAIS = newAIS;
                }
            });
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.