From 977951fd309ef77917421e237395e568b8614755 Mon Sep 17 00:00:00 2001 From: Yunhua Koglin <kogliny@amazon.com> Date: Tue, 15 Jun 2021 18:51:22 +0000 Subject: [PATCH] enable redis auth token commit 0dd2c1be Author: Yunhua Koglin <kogliny@amazon.com> Date: Fri Jun 11 2021 15:28:07 GMT-0500 (Central Daylight Time) typo commit c96768ec Author: Yunhua Koglin <kogliny@amazon.com> Date: Fri Jun 11 2021 10:59:45 GMT-0500 (Central Daylight Time) secret --- .../org/opengroup/osdu/indexer/aws/cache/IndexCacheImpl.java | 3 ++- .../org/opengroup/osdu/indexer/aws/cache/SchemaCacheImpl.java | 3 ++- provider/indexer-aws/src/main/resources/application.properties | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/IndexCacheImpl.java b/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/IndexCacheImpl.java index c28acd5c3..2c08033eb 100644 --- a/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/IndexCacheImpl.java +++ b/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/IndexCacheImpl.java @@ -26,8 +26,9 @@ public class IndexCacheImpl implements IIndexCache<String, Boolean>, AutoCloseab public IndexCacheImpl(@Value("${aws.elasticache.cluster.endpoint}") final String REDIS_SEARCH_HOST, @Value("${aws.elasticache.cluster.port}") final String REDIS_SEARCH_PORT, + @Value("${aws.elasticache.cluster.key}") final String REDIS_SEARCH_KEY, @Value("${aws.elasticache.cluster.index.expiration}") final String INDEX_CACHE_EXPIRATION) { - cache = new RedisCache<>(REDIS_SEARCH_HOST, Integer.parseInt(REDIS_SEARCH_PORT), + cache = new RedisCache<>(REDIS_SEARCH_HOST, Integer.parseInt(REDIS_SEARCH_PORT), REDIS_SEARCH_KEY, Integer.parseInt(INDEX_CACHE_EXPIRATION) * 60, String.class, Boolean.class); } diff --git a/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/SchemaCacheImpl.java b/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/SchemaCacheImpl.java index e0a713737..5b8b8f02e 100644 --- a/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/SchemaCacheImpl.java +++ b/provider/indexer-aws/src/main/java/org/opengroup/osdu/indexer/aws/cache/SchemaCacheImpl.java @@ -26,8 +26,9 @@ public class SchemaCacheImpl implements ISchemaCache<String, String>, AutoClosea public SchemaCacheImpl(@Value("${aws.elasticache.cluster.endpoint}") final String REDIS_SEARCH_HOST, @Value("${aws.elasticache.cluster.port}") final String REDIS_SEARCH_PORT, + @Value("${aws.elasticache.cluster.key}") final String REDIS_SEARCH_KEY, @Value("${aws.elasticache.cluster.schema.expiration}") final String SCHEMA_CACHE_EXPIRATION) { - cache = new RedisCache<>(REDIS_SEARCH_HOST, Integer.parseInt(REDIS_SEARCH_PORT), + cache = new RedisCache<>(REDIS_SEARCH_HOST, Integer.parseInt(REDIS_SEARCH_PORT), REDIS_SEARCH_KEY, Integer.parseInt(SCHEMA_CACHE_EXPIRATION) * 60, String.class, String.class); } diff --git a/provider/indexer-aws/src/main/resources/application.properties b/provider/indexer-aws/src/main/resources/application.properties index e45fcb80f..35404a77f 100644 --- a/provider/indexer-aws/src/main/resources/application.properties +++ b/provider/indexer-aws/src/main/resources/application.properties @@ -34,6 +34,7 @@ INDEXER_QUEUE_HOST="" ## AWS ElastiCache configuration aws.elasticache.cluster.endpoint=${CACHE_CLUSTER_ENDPOINT} aws.elasticache.cluster.port=${CACHE_CLUSTER_PORT} +aws.elasticache.cluster.key=${CACHE_CLUSTER_KEY} ## Cache Settings aws.elasticache.cluster.index.expiration=60 -- GitLab