Search in sources :

Example 1 with ProxyMetaManager

use of com.actiontech.dble.meta.ProxyMetaManager in project dble by actiontech.

the class DbleServer method reloadMetaData.

public void reloadMetaData(ServerConfig conf) {
    ProxyMetaManager tmpManager = tmManager;
    for (; ; ) {
        if (tmpManager.getMetaCount() > 0) {
            continue;
        }
        ReentrantLock lock = tmpManager.getMetaLock();
        lock.lock();
        try {
            if (tmpManager.getMetaCount() > 0) {
                continue;
            }
            ProxyMetaManager newManager = new ProxyMetaManager();
            newManager.initMeta(conf);
            tmManager = newManager;
            tmpManager.terminate();
            break;
        } finally {
            lock.unlock();
        }
    }
}
Also used : ReentrantLock(java.util.concurrent.locks.ReentrantLock) ProxyMetaManager(com.actiontech.dble.meta.ProxyMetaManager)

Example 2 with ProxyMetaManager

use of com.actiontech.dble.meta.ProxyMetaManager in project dble by actiontech.

the class DbleServer method pullVarAndMeta.

private void pullVarAndMeta() throws IOException {
    tmManager = new ProxyMetaManager();
    if (!this.getConfig().isDataHostWithoutWR()) {
        // init for sys VAR
        VarsExtractorHandler handler = new VarsExtractorHandler(config.getDataNodes());
        systemVariables = handler.execute();
        reviseSchemas();
        initDataHost();
        // init tmManager
        try {
            tmManager.init(this.getConfig());
        } catch (Exception e) {
            throw new IOException(e);
        }
    }
}
Also used : VarsExtractorHandler(com.actiontech.dble.server.variables.VarsExtractorHandler) ProxyMetaManager(com.actiontech.dble.meta.ProxyMetaManager)

Aggregations

ProxyMetaManager (com.actiontech.dble.meta.ProxyMetaManager)2 VarsExtractorHandler (com.actiontech.dble.server.variables.VarsExtractorHandler)1 ReentrantLock (java.util.concurrent.locks.ReentrantLock)1