Search in sources :

Example 1 with LogManager

use of org.janusgraph.diskstorage.log.LogManager in project janusgraph by JanusGraph.

the class Backend method getLogManager.

private static LogManager getLogManager(Configuration config, String logName, KeyColumnValueStoreManager sm) {
    Configuration logConfig = config.restrictTo(logName);
    String backend = logConfig.get(LOG_BACKEND);
    if (backend.equalsIgnoreCase(LOG_BACKEND.getDefaultValue())) {
        return new KCVSLogManager(sm, logConfig);
    } else {
        Preconditions.checkArgument(config != null);
        LogManager lm = getImplementationClass(logConfig, logConfig.get(LOG_BACKEND), REGISTERED_LOG_MANAGERS);
        Preconditions.checkNotNull(lm);
        return lm;
    }
}
Also used : KCVSLogManager(org.janusgraph.diskstorage.log.kcvs.KCVSLogManager) KCVSConfiguration(org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration) GraphDatabaseConfiguration(org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration) TransactionConfiguration(org.janusgraph.graphdb.transaction.TransactionConfiguration) KCVSLogManager(org.janusgraph.diskstorage.log.kcvs.KCVSLogManager) LogManager(org.janusgraph.diskstorage.log.LogManager)

Example 2 with LogManager

use of org.janusgraph.diskstorage.log.LogManager in project janusgraph by JanusGraph.

the class JanusGraphBaseTest method closeLogs.

private void closeLogs() {
    try {
        for (LogManager lm : logManagers.values()) lm.close();
        logManagers.clear();
        if (logStoreManager != null) {
            logStoreManager.close();
            logStoreManager = null;
        }
    } catch (BackendException e) {
        throw new JanusGraphException(e);
    }
}
Also used : KCVSLogManager(org.janusgraph.diskstorage.log.kcvs.KCVSLogManager) LogManager(org.janusgraph.diskstorage.log.LogManager) BackendException(org.janusgraph.diskstorage.BackendException)

Aggregations

LogManager (org.janusgraph.diskstorage.log.LogManager)2 KCVSLogManager (org.janusgraph.diskstorage.log.kcvs.KCVSLogManager)2 BackendException (org.janusgraph.diskstorage.BackendException)1 KCVSConfiguration (org.janusgraph.diskstorage.configuration.backend.KCVSConfiguration)1 GraphDatabaseConfiguration (org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration)1 TransactionConfiguration (org.janusgraph.graphdb.transaction.TransactionConfiguration)1