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();
}
}
}
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);
}
}
}
Aggregations