Skip to content

Commit

Permalink
Hazelcast config for multiple clusters (#2508)
Browse files Browse the repository at this point in the history
* Hazelcast config with multiple clusters

* PR changes 1

* Updated second Hazelcast cluster config

* PR Changes

---------

Co-authored-by: Jason Thomas jjthom3 <[email protected]>
Co-authored-by: Whitney O'Meara <[email protected]>
  • Loading branch information
3 people committed Aug 21, 2024
1 parent 7b70b47 commit d6e5db0
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docker/config/application-query.yml
Original file line number Diff line number Diff line change
Expand Up @@ -569,4 +569,9 @@ datawave:
modelFieldName: "ATTR3"
direction: "FORWARD"
indexOnly: false


# Enable additional Hazelcast cluster for use by the query and executor services
hazelcast:
client:
clusterName: ${QUERY_CACHE:cache}
clusterName: ${QUERY_CACHE:cache}
36 changes: 36 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,39 @@ services:
configuration:
condition: service_started

query-cache:
profiles:
- querycache
# To enable an additional Hazelcast cluster, enable the "querycache" profile
# Set an environment variable: QUERY_CACHE=query-cache. This will force the query and executor service to use a separate "query-cache" Hazelcast cluster.
image: datawave/hazelcast-service
scale: 1
command:
- --spring.application.name=query-cache
- --hazelcast.client.cluster-members
- --spring.profiles.active=consul,compose,remoteauth
- --spring.output.ansi.enabled=ALWAYS
- --spring.cloud.consul.host=consul
- --spring.cloud.consul.discovery.instance-id=$${spring.application.name}:$${random.value}
ports:
- "5701-5703"
- "8080"
- "8844:8443"
volumes:
- ${PKI_DIR:-./pki}:/etc/pki:ro
- ./logs:/logs
networks:
- demo
healthcheck:
test: curl -f http://localhost:8080/query-cache/mgmt/health
interval: 10s
timeout: 1s
start_period: 45s
retries: 3
depends_on:
configuration:
condition: service_started

authorization:
entrypoint: [ "java","-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5008","-jar","app.jar" ]
image: datawave/authorization-service
Expand Down Expand Up @@ -368,6 +401,7 @@ services:
- HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-/etc/hadoop/conf}
- "BACKEND=${BACKEND:-rabbitmq}"
- CACHED_RESULTS=${CACHED_RESULTS:-false}
- QUERY_CACHE=${QUERY_CACHE:-cache}
ports:
- "8080:8080"
- "8443:8443"
Expand Down Expand Up @@ -447,6 +481,7 @@ services:
- HADOOP_HOST=${DW_HADOOP_HOST}
- BACKEND=${BACKEND:-rabbitmq}
- HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-/etc/hadoop/conf}
- QUERY_CACHE=${QUERY_CACHE:-cache}
# This mapping is required to enable the metrics service to communicate
# with host-deployed services like hadoop, zookeeper, and accumulo.
# These values are set locally in .env via bootstrap.sh
Expand Down Expand Up @@ -494,6 +529,7 @@ services:
- HADOOP_HOST=${DW_HADOOP_HOST}
- BACKEND=${BACKEND:-rabbitmq}
- HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-/etc/hadoop/conf}
- QUERY_CACHE=${QUERY_CACHE:-cache}
# This mapping is required to enable the metrics service to communicate
# with host-deployed services like hadoop, zookeeper, and accumulo.
# These values are set locally in .env via bootstrap.sh
Expand Down

0 comments on commit d6e5db0

Please sign in to comment.