Search in sources :

Example 1 with OrderedKeyValueStoreManager

use of org.janusgraph.diskstorage.keycolumnvalue.keyvalue.OrderedKeyValueStoreManager in project janusgraph by JanusGraph.

the class Backend method getStorageManager.

public static KeyColumnValueStoreManager getStorageManager(Configuration storageConfig) {
    StoreManager manager = getImplementationClass(storageConfig, storageConfig.get(STORAGE_BACKEND), StandardStoreManager.getAllManagerClasses());
    if (manager instanceof OrderedKeyValueStoreManager) {
        Map<String, Integer> keyLength = new HashMap<>(3);
        keyLength.put(EDGESTORE_NAME, 8);
        keyLength.put(EDGESTORE_NAME + LOCK_STORE_SUFFIX, 8);
        keyLength.put(storageConfig.get(IDS_STORE_NAME), 8);
        keyLength = Collections.unmodifiableMap(keyLength);
        manager = new OrderedKeyValueStoreManagerAdapter((OrderedKeyValueStoreManager) manager, keyLength);
    }
    Preconditions.checkArgument(manager instanceof KeyColumnValueStoreManager, "Invalid storage manager: %s", manager.getClass());
    return (KeyColumnValueStoreManager) manager;
}
Also used : OrderedKeyValueStoreManager(org.janusgraph.diskstorage.keycolumnvalue.keyvalue.OrderedKeyValueStoreManager) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) HashMap(java.util.HashMap) OrderedKeyValueStoreManagerAdapter(org.janusgraph.diskstorage.keycolumnvalue.keyvalue.OrderedKeyValueStoreManagerAdapter) KeyColumnValueStoreManager(org.janusgraph.diskstorage.keycolumnvalue.KeyColumnValueStoreManager) OrderedKeyValueStoreManager(org.janusgraph.diskstorage.keycolumnvalue.keyvalue.OrderedKeyValueStoreManager) StoreManager(org.janusgraph.diskstorage.keycolumnvalue.StoreManager) KeyColumnValueStoreManager(org.janusgraph.diskstorage.keycolumnvalue.KeyColumnValueStoreManager) ExpectedValueCheckingStoreManager(org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingStoreManager) MetricInstrumentedStoreManager(org.janusgraph.diskstorage.util.MetricInstrumentedStoreManager)

Aggregations

HashMap (java.util.HashMap)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 KeyColumnValueStoreManager (org.janusgraph.diskstorage.keycolumnvalue.KeyColumnValueStoreManager)1 StoreManager (org.janusgraph.diskstorage.keycolumnvalue.StoreManager)1 OrderedKeyValueStoreManager (org.janusgraph.diskstorage.keycolumnvalue.keyvalue.OrderedKeyValueStoreManager)1 OrderedKeyValueStoreManagerAdapter (org.janusgraph.diskstorage.keycolumnvalue.keyvalue.OrderedKeyValueStoreManagerAdapter)1 ExpectedValueCheckingStoreManager (org.janusgraph.diskstorage.locking.consistentkey.ExpectedValueCheckingStoreManager)1 MetricInstrumentedStoreManager (org.janusgraph.diskstorage.util.MetricInstrumentedStoreManager)1