Search in sources :

Example 6 with StoreFeatures

use of org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures in project janusgraph by JanusGraph.

the class AbstractCassandraStoreTest method testUnorderedConfiguration.

@Test
@Category({ UnorderedKeyStoreTests.class })
public void testUnorderedConfiguration() {
    if (!manager.getFeatures().hasUnorderedScan()) {
        log.warn("Can't test key-unordered 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();
    assertFalse(features.isKeyOrdered());
    assertFalse(features.hasLocalKeyPartition());
}
Also used : StoreFeatures(org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures) Category(org.junit.experimental.categories.Category) KeyColumnValueStoreTest(org.janusgraph.diskstorage.KeyColumnValueStoreTest) Test(org.junit.Test)

Example 7 with StoreFeatures

use of org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures in project janusgraph by JanusGraph.

the class AbstractStoreManager method getMetaDataSchema.

public EntryMetaData[] getMetaDataSchema(String storeName) {
    List<EntryMetaData> schemaBuilder = Lists.newArrayList();
    StoreFeatures features = getFeatures();
    if (features.hasTimestamps() && storageConfig.get(STORE_META_TIMESTAMPS, storeName))
        schemaBuilder.add(EntryMetaData.TIMESTAMP);
    if (features.hasCellTTL() && storageConfig.get(STORE_META_TTL, storeName))
        schemaBuilder.add(EntryMetaData.TTL);
    if (features.hasVisibility() && storageConfig.get(STORE_META_VISIBILITY, storeName))
        schemaBuilder.add(EntryMetaData.VISIBILITY);
    if (schemaBuilder.isEmpty())
        return StaticArrayEntry.EMPTY_SCHEMA;
    return schemaBuilder.toArray(new EntryMetaData[schemaBuilder.size()]);
}
Also used : StoreFeatures(org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures) EntryMetaData(org.janusgraph.diskstorage.EntryMetaData)

Example 8 with StoreFeatures

use of org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures in project janusgraph by JanusGraph.

the class CQLStoreTest method testUnorderedConfiguration.

@Test
@Category({ UnorderedKeyStoreTests.class })
public void testUnorderedConfiguration() {
    if (!this.manager.getFeatures().hasUnorderedScan()) {
        LOGGER.warn("Can't test key-unordered features on incompatible store.  " + "This warning could indicate reduced test coverage and " + "a broken JUnit configuration.  Skipping test {}.", this.name.getMethodName());
        return;
    }
    final StoreFeatures features = this.manager.getFeatures();
    assertFalse(features.isKeyOrdered());
    assertFalse(features.hasLocalKeyPartition());
}
Also used : StoreFeatures(org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures) Category(org.junit.experimental.categories.Category) KeyColumnValueStoreTest(org.janusgraph.diskstorage.KeyColumnValueStoreTest) Test(org.junit.Test)

Example 9 with StoreFeatures

use of org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures in project janusgraph by JanusGraph.

the class CQLStoreTest method testOrderedConfiguration.

@Test
@Category({ OrderedKeyStoreTests.class })
public void testOrderedConfiguration() {
    if (!this.manager.getFeatures().hasOrderedScan()) {
        LOGGER.warn("Can't test key-ordered features on incompatible store.  " + "This warning could indicate reduced test coverage and " + "a broken JUnit configuration.  Skipping test {}.", this.name.getMethodName());
        return;
    }
    final StoreFeatures features = this.manager.getFeatures();
    assertTrue(features.isKeyOrdered());
}
Also used : StoreFeatures(org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures) Category(org.junit.experimental.categories.Category) KeyColumnValueStoreTest(org.janusgraph.diskstorage.KeyColumnValueStoreTest) Test(org.junit.Test)

Example 10 with StoreFeatures

use of org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures in project janusgraph by JanusGraph.

the class StorageFeaturesTest method testFeaturesImplementation.

@Test
public void testFeaturesImplementation() {
    StoreFeatures features;
    features = new StandardStoreFeatures.Builder().build();
    assertFalse(features.hasMultiQuery());
    assertFalse(features.hasLocking());
    assertFalse(features.isDistributed());
    assertFalse(features.hasScan());
    features = new StandardStoreFeatures.Builder().locking(true).build();
    assertFalse(features.hasMultiQuery());
    assertTrue(features.hasLocking());
    assertFalse(features.isDistributed());
    features = new StandardStoreFeatures.Builder().multiQuery(true).unorderedScan(true).build();
    assertTrue(features.hasMultiQuery());
    assertTrue(features.hasUnorderedScan());
    assertFalse(features.hasOrderedScan());
    assertTrue(features.hasScan());
    assertFalse(features.isDistributed());
    assertFalse(features.hasLocking());
}
Also used : StandardStoreFeatures(org.janusgraph.diskstorage.keycolumnvalue.StandardStoreFeatures) StandardStoreFeatures(org.janusgraph.diskstorage.keycolumnvalue.StandardStoreFeatures) StoreFeatures(org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures) Test(org.junit.Test)

Aggregations

StoreFeatures (org.janusgraph.diskstorage.keycolumnvalue.StoreFeatures)11 Test (org.junit.Test)8 KeyColumnValueStoreTest (org.janusgraph.diskstorage.KeyColumnValueStoreTest)6 Category (org.junit.experimental.categories.Category)5 StandardStoreFeatures (org.janusgraph.diskstorage.keycolumnvalue.StandardStoreFeatures)2 BackendException (org.janusgraph.diskstorage.BackendException)1 EntryMetaData (org.janusgraph.diskstorage.EntryMetaData)1 AbstractCassandraStoreTest (org.janusgraph.diskstorage.cassandra.AbstractCassandraStoreTest)1 ModifiableConfiguration (org.janusgraph.diskstorage.configuration.ModifiableConfiguration)1 KeyColumnValueStore (org.janusgraph.diskstorage.keycolumnvalue.KeyColumnValueStore)1 KeyColumnValueStoreManager (org.janusgraph.diskstorage.keycolumnvalue.KeyColumnValueStoreManager)1 StoreTransaction (org.janusgraph.diskstorage.keycolumnvalue.StoreTransaction)1 Locker (org.janusgraph.diskstorage.locking.Locker)1 LockerProvider (org.janusgraph.diskstorage.locking.LockerProvider)1 ExpectedValueCheckingStoreManager (org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingStoreManager)1 KCVSLogManager (org.janusgraph.diskstorage.log.kcvs.KCVSLogManager)1 StandardBaseTransactionConfig (org.janusgraph.diskstorage.util.StandardBaseTransactionConfig)1 GraphDatabaseConfiguration (org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration)1 Before (org.junit.Before)1