Skip to content
Snippets Groups Projects
Commit d403f4fc authored by Bill Wang's avatar Bill Wang
Browse files

update

parent 59508932
No related branches found
No related tags found
1 merge request!191EKS Deploy
......@@ -14,6 +14,9 @@
package org.opengroup.osdu.indexer.aws.cache;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.opengroup.osdu.core.aws.cache.AwsElasticCache;
import org.opengroup.osdu.core.aws.ssm.K8sParameterNotFoundException;
import org.opengroup.osdu.core.common.cache.ICache;
import org.opengroup.osdu.core.common.cache.RedisCache;
import org.opengroup.osdu.indexer.provider.interfaces.ISchemaCache;
......@@ -25,12 +28,8 @@ public class SchemaCacheImpl implements ISchemaCache<String, String>, AutoClosea
private ICache<String, String> cache;
private Boolean local = false;
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), REDIS_SEARCH_KEY,
Integer.parseInt(SCHEMA_CACHE_EXPIRATION) * 60, String.class, String.class);
public SchemaCacheImpl(@Value("${aws.elasticache.cluster.schema.expiration}") final String SCHEMA_CACHE_EXPIRATION) throws K8sParameterNotFoundException, JsonProcessingException {
cache = AwsElasticCache.RedisCache(Integer.parseInt(SCHEMA_CACHE_EXPIRATION) * 60, String.class, String.class);
if (cache.getClass() == RedisCache.class){
local = false;
}else{
......
......@@ -32,9 +32,6 @@ STORAGE_QUERY_RECORD_FOR_CONVERSION_HOST=${STORAGE_BASE_URL}/api/storage/v2/quer
STORAGE_RECORDS_BATCH_SIZE=20
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment