forked from JanusGraph/janusgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PLT-191: update prefix through config
- Loading branch information
Showing
3 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
|
||
package org.janusgraph.diskstorage.keycolumnvalue.cache; | ||
|
||
import static org.janusgraph.graphdb.configuration.GraphDatabaseConfiguration.CACHE_KEYSPACE_PREFIX; | ||
|
||
import com.google.common.base.Preconditions; | ||
import com.google.common.cache.CacheLoader; | ||
|
@@ -47,7 +48,6 @@ | |
import static org.janusgraph.util.datastructures.ByteSize.OBJECT_HEADER; | ||
import static org.janusgraph.util.datastructures.ByteSize.OBJECT_REFERENCE; | ||
import static org.janusgraph.util.datastructures.ByteSize.STATICARRAYBUFFER_RAW_SIZE; | ||
|
||
/** | ||
* @author Matthias Broecheler ([email protected]) | ||
*/ | ||
|
@@ -59,8 +59,7 @@ public class ExpirationKCVSRedisCache extends KCVSCache { | |
|
||
private static final int INVALIDATE_KEY_FRACTION_PENALTY = 1000; | ||
private static final int PENALTY_THRESHOLD = 5; | ||
public static final String REDIS_CACHE_PREFIX = "redis-cache-"; | ||
public static final String REDIS_INDEX_CACHE_PREFIX = "redis-index-cache-"; | ||
public static final String REDIS_INDEX_CACHE_PREFIX = "-index-"; | ||
|
||
private volatile CountDownLatch penaltyCountdown; | ||
|
||
|
@@ -86,8 +85,8 @@ public ExpirationKCVSRedisCache(final KeyColumnValueStore store, String metricsN | |
this.invalidationGracePeriodMS = invalidationGracePeriodMS; | ||
|
||
redissonClient = RedissonCache.getRedissonClient(configuration); | ||
redisCache = redissonClient.getLocalCachedMap(REDIS_CACHE_PREFIX + metricsName, LocalCachedMapOptions.defaults()); | ||
redisIndexKeys = redissonClient.getLocalCachedMap(REDIS_INDEX_CACHE_PREFIX + metricsName, LocalCachedMapOptions.defaults()); | ||
redisCache = redissonClient.getLocalCachedMap(String.join("-",configuration.get(CACHE_KEYSPACE_PREFIX), metricsName), LocalCachedMapOptions.defaults()); | ||
redisIndexKeys = redissonClient.getLocalCachedMap(String.join("-", configuration.get(CACHE_KEYSPACE_PREFIX) , REDIS_INDEX_CACHE_PREFIX , metricsName), LocalCachedMapOptions.defaults()); | ||
expiredKeys = new ConcurrentHashMap<>(50, 0.75f, concurrencyLevel); | ||
penaltyCountdown = new CountDownLatch(PENALTY_THRESHOLD); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters