use of org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures in project janusgraph by JanusGraph.
the class JanusGraphBaseTest method openLog.
private Log openLog(String logManagerName, String logName) {
try {
ModifiableConfiguration configuration = new ModifiableConfiguration(GraphDatabaseConfiguration.ROOT_NS, config.copy(), BasicConfiguration.Restriction.NONE);
configuration.set(GraphDatabaseConfiguration.UNIQUE_INSTANCE_ID, "reader");
configuration.set(GraphDatabaseConfiguration.LOG_READ_INTERVAL, Duration.ofMillis(500L), logManagerName);
if (logStoreManager == null) {
logStoreManager = Backend.getStorageManager(configuration);
}
StoreFeatures f = logStoreManager.getFeatures();
boolean part = f.isDistributed() && f.isKeyOrdered();
if (part) {
for (String partitionedLogName : new String[] { USER_LOG, TRANSACTION_LOG, MANAGEMENT_LOG }) configuration.set(KCVSLogManager.LOG_MAX_PARTITIONS, 8, partitionedLogName);
}
assert logStoreManager != null;
if (!logManagers.containsKey(logManagerName)) {
// Open log manager - only supports KCVSLog
Configuration logConfig = configuration.restrictTo(logManagerName);
Preconditions.checkArgument(logConfig.get(LOG_BACKEND).equals(LOG_BACKEND.getDefaultValue()));
logManagers.put(logManagerName, new KCVSLogManager(logStoreManager, logConfig));
}
assert logManagers.containsKey(logManagerName);
return logManagers.get(logManagerName).openLog(logName);
} catch (BackendException e) {
throw new JanusGraphException("Could not open log: " + logName, e);
}
}
use of org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures in project janusgraph by JanusGraph.
the class AbstractCassandraStoreTest method testOrderedConfiguration.
@Test
@Category({ OrderedKeyStoreTests.class })
public void testOrderedConfiguration() {
if (!manager.getFeatures().hasOrderedScan()) {
log.warn("Can't test key-ordered features on incompatible store. " + "This warning could indicate reduced test coverage and " + "a broken JUnit configuration. Skipping test {}.", name.getMethodName());
return;
}
StoreFeatures features = manager.getFeatures();
assertTrue(features.isKeyOrdered());
}
use of org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures in project janusgraph by JanusGraph.
the class AbstractCassandraStoreTest method testTTLSupported.
@Test
public void testTTLSupported() {
StoreFeatures features = manager.getFeatures();
assertTrue(features.hasCellTTL());
}
use of org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures in project janusgraph by JanusGraph.
the class EmbeddedStoreTest method testConfiguration.
@Test
@Category({ OrderedKeyStoreTests.class })
public void testConfiguration() {
StoreFeatures features = manager.getFeatures();
assertTrue(features.isKeyOrdered());
assertTrue(features.hasLocalKeyPartition());
}
use of org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures in project janusgraph by JanusGraph.
the class CQLStoreTest method testTTLSupported.
@Test
public void testTTLSupported() {
final StoreFeatures features = this.manager.getFeatures();
assertTrue(features.hasCellTTL());
}
Aggregations