Skip to content

Commit

Permalink
Merge pull request #3 from arenadata/feature/ADH-5240
Browse files Browse the repository at this point in the history
[ADH-5240]: Implement the trino-adb connector recording function
  • Loading branch information
iamlapa authored Dec 6, 2024
2 parents 44a9648 + a74e292 commit 03cc221
Show file tree
Hide file tree
Showing 142 changed files with 10,629 additions and 4 deletions.
4 changes: 4 additions & 0 deletions core/docker/arenadata/coordinator/etc/catalog/adb.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
connector.name=adb
connection-url=jdbc:postgresql://adb:6000/postgres
connection-user=gpadmin
connection-password=gpadmin
2 changes: 1 addition & 1 deletion core/docker/arenadata/coordinator/etc/log.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Enable verbose logging from Trino
#io.trino=DEBUG
io.trino=DEBUG
184 changes: 184 additions & 0 deletions core/docker/arenadata/docker-compose-with-adb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
version: "3.8"
services:
postgres:
image: "docker.io/library/postgres:12.0"
restart: unless-stopped
container_name: postgres-db
hostname: postgres-db
environment:
POSTGRES_DB: '${POSTGRES_DB}'
POSTGRES_USER: '${POSTGRES_USER}'
POSTGRES_PASSWORD: '${POSTGRES_PASSWORD}'
ports:
- '5432:5432'
healthcheck:
test: psql -d ${POSTGRES_DB} -U ${POSTGRES_USER} -Atc 'SELECT 1;'
interval: 30s
timeout: 15s
retries: 3
networks:
- trino-with-adb

coordinator:
image: "trino:${TRINO_VERSION}"
ports:
- "8080:8080"
- "8990:8990"
container_name: "coordinator"
volumes:
- ./coordinator/etc:/etc/trino:rw
depends_on:
- postgres
networks:
- trino-with-adb

worker0:
image: "trino:${TRINO_VERSION}"
container_name: "worker0"
ports:
- "8081:8080"
- "8991:8990"
volumes:
- ./worker/etc:/etc/trino:rw
depends_on:
- postgres
networks:
- "trino-with-adb"

worker1:
image: "trino:${TRINO_VERSION}"
container_name: "worker1"
ports:
- "8082:8080"
- "8992:8990"
volumes:
- ./worker/etc:/etc/trino:rw
depends_on:
- postgres
networks:
- trino-with-adb

adb:
image: "hub.adsw.io/adbcc/gpdb6-adbm-distributed:it"
working_dir: /home/gpadmin
hostname: mdw
ports:
- "6000:6000"
- "38005:35285"
environment:
- ADB_CLUSTER_NAME=adb
- ADBM_EUREKA_CLIENT_HOSTNAME=mdw
- ADBM_EUREKA_CLIENT_IP_ADDRESS=mdw
- ADBM_EUREKA_CLIENT_PREFER_IP_ADDRESS=true
- ADBM_EUREKA_CLIENT_SERV_URL_DEF_ZONE=http://registry:8761/eureka
- AGENT_JAVA_OPTS=-XX:+HeapDumpOnOutOfMemoryError -XX:+UseStringDeduplication -XX:+OptimizeStringConcat -XX:+UseLWPSynchronization -XX:HeapDumpPath=/opt/adbm-agent/tmp/java_pid.hprof -Xlog:gc*,safepoint:gc.log:time,uptime:filecount=100,filesize=50M -Djava.library.path=/opt/adbm-agent/tmp -Djava.io.tmpdir=/opt/adbm-agent/tmp -Dlogging.config=/opt/adbm-agent/adbm-agent-logback.xml -Xmx2g -Xms256m -Dspring.config.location=file:///opt/adbm-agent/adbm-agent-application.yml
- DOCKER_GP_CLUSTER_HOSTS=mdw,smdw,sdw1,sdw2
- DOCKER_GP_MASTER_SERVER=mdw
- DOCKER_GP_STANDBY_SERVER=smdw
- DOCKER_GP_SEGMENT_SERVERS=sdw1,sdw2
- DOCKER_GP_PRIMARY_SEGMENTS_PER_HOST=2
- DOCKER_GP_WITH_MIRROR=true
depends_on:
- sdw1
- sdw2
- smdw
volumes:
- backup-data:/tmp/pgbackrest/:rw
privileged: true
extra_hosts:
- "host.docker.internal:host-gateway"
sysctls:
kernel.sem: 500 1024000 200 4096
networks:
- trino-with-adb

sdw1:
image: "hub.adsw.io/adbcc/gpdb6-adbm-distributed:it"
privileged: true
hostname: sdw1
ports:
- "38006:35285"
environment:
- ADB_CLUSTER_NAME=adb
- ADBM_EUREKA_CLIENT_HOSTNAME=sdw1
- ADBM_EUREKA_CLIENT_IP_ADDRESS=sdw1
- ADBM_EUREKA_CLIENT_PREFER_IP_ADDRESS=true
- ADBM_EUREKA_CLIENT_SERV_URL_DEF_ZONE=http://registry:8761/eureka
- AGENT_JAVA_OPTS=-XX:+HeapDumpOnOutOfMemoryError -XX:+UseStringDeduplication -XX:+OptimizeStringConcat -XX:+UseLWPSynchronization -XX:HeapDumpPath=/opt/adbm-agent/tmp/java_pid.hprof -Xlog:gc*,safepoint:gc.log:time,uptime:filecount=100,filesize=50M -Djava.library.path=/opt/adbm-agent/tmp -Djava.io.tmpdir=/opt/adbm-agent/tmp -Dlogging.config=/opt/adbm-agent/adbm-agent-logback.xml -Xmx2g -Xms256m -Dspring.config.location=file:///opt/adbm-agent/adbm-agent-application.yml
- DOCKER_GP_CLUSTER_HOSTS=mdw,smdw,sdw1,sdw2
- DOCKER_GP_MASTER_SERVER=mdw
- DOCKER_GP_STANDBY_SERVER=smdw
- DOCKER_GP_SEGMENT_SERVERS=sdw1,sdw2
- DOCKER_GP_PRIMARY_SEGMENTS_PER_HOST=2
- DOCKER_GP_WITH_MIRROR=true
volumes:
- backup-data:/tmp/pgbackrest/:rw
extra_hosts:
- "host.docker.internal:host-gateway"
sysctls:
kernel.sem: 500 1024000 200 4096
networks:
- trino-with-adb

sdw2:
image: "hub.adsw.io/adbcc/gpdb6-adbm-distributed:it"
privileged: true
hostname: sdw2
ports:
- "38007:35285"
environment:
- ADB_CLUSTER_NAME=adb
- ADBM_EUREKA_CLIENT_HOSTNAME=sdw2
- ADBM_EUREKA_CLIENT_IP_ADDRESS=sdw2
- ADBM_EUREKA_CLIENT_PREFER_IP_ADDRESS=true
- ADBM_EUREKA_CLIENT_SERV_URL_DEF_ZONE=http://registry:8761/eureka
- AGENT_JAVA_OPTS=-XX:+HeapDumpOnOutOfMemoryError -XX:+UseStringDeduplication -XX:+OptimizeStringConcat -XX:+UseLWPSynchronization -XX:HeapDumpPath=/opt/adbm-agent/tmp/java_pid.hprof -Xlog:gc*,safepoint:gc.log:time,uptime:filecount=100,filesize=50M -Djava.library.path=/opt/adbm-agent/tmp -Djava.io.tmpdir=/opt/adbm-agent/tmp -Dlogging.config=/opt/adbm-agent/adbm-agent-logback.xml -Xmx2g -Xms256m -Dspring.config.location=file:///opt/adbm-agent/adbm-agent-application.yml
- DOCKER_GP_CLUSTER_HOSTS=mdw,smdw,sdw1,sdw2
- DOCKER_GP_MASTER_SERVER=mdw
- DOCKER_GP_STANDBY_SERVER=smdw
- DOCKER_GP_SEGMENT_SERVERS=sdw1,sdw2
- DOCKER_GP_PRIMARY_SEGMENTS_PER_HOST=2
- DOCKER_GP_WITH_MIRROR=true
volumes:
- backup-data:/tmp/pgbackrest/:rw
extra_hosts:
- "host.docker.internal:host-gateway"
sysctls:
kernel.sem: 500 1024000 200 4096
networks:
- trino-with-adb

smdw:
image: "hub.adsw.io/adbcc/gpdb6-adbm-distributed:it"
privileged: true
hostname: smdw
ports:
- "5433:6000"
- "38008:35285"
environment:
- ADB_CLUSTER_NAME=adb
- ADBM_EUREKA_CLIENT_HOSTNAME=smdw
- ADBM_EUREKA_CLIENT_IP_ADDRESS=smdw
- ADBM_EUREKA_CLIENT_PREFER_IP_ADDRESS=true
- ADBM_EUREKA_CLIENT_SERV_URL_DEF_ZONE=http://registry:8761/eureka
- AGENT_JAVA_OPTS=-XX:+HeapDumpOnOutOfMemoryError -XX:+UseStringDeduplication -XX:+OptimizeStringConcat -XX:+UseLWPSynchronization -XX:HeapDumpPath=/opt/adbm-agent/tmp/java_pid.hprof -Xlog:gc*,safepoint:gc.log:time,uptime:filecount=100,filesize=50M -Djava.library.path=/opt/adbm-agent/tmp -Djava.io.tmpdir=/opt/adbm-agent/tmp -Dlogging.config=/opt/adbm-agent/adbm-agent-logback.xml -Xmx2g -Xms256m -Dspring.config.location=file:///opt/adbm-agent/adbm-agent-application.yml
- DOCKER_GP_CLUSTER_HOSTS=mdw,smdw,sdw1,sdw2
- DOCKER_GP_MASTER_SERVER=mdw
- DOCKER_GP_STANDBY_SERVER=smdw
- DOCKER_GP_SEGMENT_SERVERS=sdw1,sdw2
- DOCKER_GP_PRIMARY_SEGMENTS_PER_HOST=2
- DOCKER_GP_WITH_MIRROR=true
volumes:
- backup-data:/tmp/pgbackrest/:rw
extra_hosts:
- "host.docker.internal:host-gateway"
sysctls:
kernel.sem: 500 1024000 200 4096
networks:
- trino-with-adb

networks:
trino-with-adb:
volumes:
backup-data:
driver: local
4 changes: 4 additions & 0 deletions core/docker/arenadata/worker/etc/catalog/adb.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
connector.name=adb
connection-url=jdbc:postgresql://adb:6000/postgres
connection-user=gpadmin
connection-password=gpadmin
2 changes: 1 addition & 1 deletion core/docker/arenadata/worker/etc/log.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Enable verbose logging from Trino
#io.trino=DEBUG
io.trino=DEBUG
6 changes: 6 additions & 0 deletions core/trino-server/src/main/provisio/trino.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
</artifactSet>

<!-- Plugins -->
<artifactSet to="plugin/adb">
<artifact id="${project.groupId}:trino-adb:zip:${project.version}">
<unpack />
</artifact>
</artifactSet>

<artifactSet to="plugin/accumulo">
<artifact id="${project.groupId}:trino-accumulo:zip:${project.version}">
<unpack />
Expand Down
Loading

0 comments on commit 03cc221

Please sign in to comment.