forked from trinodb/trino
-
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.
- added files for starting trino server in multi node mode in docker containers
- Loading branch information
1 parent
8b22b62
commit 44a9648
Showing
24 changed files
with
215 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
TRINO_VERSION=455-SNAPSHOT-amd64 | ||
POSTGRES_DB=trino | ||
POSTGRES_USER=trino | ||
POSTGRES_PASSWORD=trino |
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Trino server in multi node configuration in docker containers | ||
|
||
## Build the project | ||
|
||
```bash | ||
cd ../../../ | ||
mvn clean install -DskipTests=true | ||
``` | ||
|
||
## Build the docker image with a specific architecture | ||
|
||
```bash | ||
../build.sh -a amd64 | ||
``` | ||
|
||
## Start docker containers | ||
|
||
```bash | ||
docker compose --env-file .env up -d | ||
``` | ||
|
||
## Stop docker containers | ||
|
||
```bash | ||
docker compose down -v | ||
``` | ||
|
||
## Connect to server via trino-cli | ||
|
||
* go to directory `../../../client/trino-cli/target` | ||
* to start the cli in interactive mode, execute command: | ||
|
||
```bash | ||
./trino-cli-${TRINO_VERSION}-executable.jar http://localhost:8080 | ||
``` |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
connector.name=jmx |
1 change: 1 addition & 0 deletions
1
core/docker/arenadata/coordinator/etc/catalog/memory.properties
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
connector.name=memory |
4 changes: 4 additions & 0 deletions
4
core/docker/arenadata/coordinator/etc/catalog/postgresql.properties
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
connector.name=postgresql | ||
connection-url=jdbc:postgresql://postgres-db:5432/postgres | ||
connection-user=trino | ||
connection-password=trino |
2 changes: 2 additions & 0 deletions
2
core/docker/arenadata/coordinator/etc/catalog/tpcds.properties
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
connector.name=tpcds | ||
tpcds.splits-per-node=4 |
2 changes: 2 additions & 0 deletions
2
core/docker/arenadata/coordinator/etc/catalog/tpch.properties
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
connector.name=tpch | ||
tpch.splits-per-node=4 |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
coordinator=true | ||
node-scheduler.include-coordinator=true | ||
http-server.http.port=8080 | ||
discovery.uri=http://coordinator:8080 | ||
catalog.management=ARENADATA | ||
|
||
arenadata.catalog.store.jdbc.url=jdbc:postgresql://postgres-db:5432/trino | ||
arenadata.catalog.store.jdbc.username=trino | ||
arenadata.catalog.store.jdbc.password=trino |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-server | ||
-agentpath:/usr/lib/trino/bin/libjvmkill.so | ||
-XX:InitialRAMPercentage=80 | ||
-XX:MaxRAMPercentage=80 | ||
-XX:G1HeapRegionSize=32M | ||
-XX:+ExplicitGCInvokesConcurrent | ||
-XX:+HeapDumpOnOutOfMemoryError | ||
-XX:+ExitOnOutOfMemoryError | ||
-XX:-OmitStackTraceInFastThrow | ||
-XX:ReservedCodeCacheSize=256M | ||
-XX:PerMethodRecompilationCutoff=10000 | ||
-XX:PerBytecodeRecompilationCutoff=10000 | ||
-Djdk.attach.allowAttachSelf=true | ||
-Djdk.nio.maxCachedBufferSize=2000000 | ||
# Allow loading dynamic agent used by JOL | ||
-XX:+EnableDynamicAgentLoading |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Enable verbose logging from Trino | ||
#io.trino=DEBUG |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node.environment=docker | ||
node.data-dir=/data/trino |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
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 | ||
|
||
coordinator: | ||
image: "trino:${TRINO_VERSION}" | ||
ports: | ||
- "8080:8080" | ||
container_name: "coordinator" | ||
volumes: | ||
- ./coordinator/etc:/etc/trino:rw | ||
depends_on: | ||
- postgres | ||
|
||
worker0: | ||
image: "trino:${TRINO_VERSION}" | ||
container_name: "worker0" | ||
ports: | ||
- "8081:8080" | ||
volumes: | ||
- ./worker/etc:/etc/trino:rw | ||
depends_on: | ||
- postgres | ||
|
||
worker1: | ||
image: "trino:${TRINO_VERSION}" | ||
container_name: "worker1" | ||
ports: | ||
- "8082:8080" | ||
volumes: | ||
- ./worker/etc:/etc/trino:rw | ||
depends_on: | ||
- postgres | ||
|
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
connector.name=jmx |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
connector.name=memory |
4 changes: 4 additions & 0 deletions
4
core/docker/arenadata/worker/etc/catalog/postgresql.properties
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
connector.name=postgresql | ||
connection-url=jdbc:postgresql://postgres-db:5432/postgres | ||
connection-user=trino | ||
connection-password=trino |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
connector.name=tpcds | ||
tpcds.splits-per-node=4 |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
connector.name=tpch | ||
tpch.splits-per-node=4 |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#single node install config | ||
coordinator=false | ||
http-server.http.port=8080 | ||
discovery.uri=http://coordinator:8080 | ||
catalog.management=ARENADATA | ||
|
||
arenadata.catalog.store.jdbc.url=jdbc:postgresql://postgres-db:5432/trino | ||
arenadata.catalog.store.jdbc.username=trino | ||
arenadata.catalog.store.jdbc.password=trino |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-server | ||
-agentpath:/usr/lib/trino/bin/libjvmkill.so | ||
-XX:InitialRAMPercentage=80 | ||
-XX:MaxRAMPercentage=80 | ||
-XX:G1HeapRegionSize=32M | ||
-XX:+ExplicitGCInvokesConcurrent | ||
-XX:+HeapDumpOnOutOfMemoryError | ||
-XX:+ExitOnOutOfMemoryError | ||
-XX:-OmitStackTraceInFastThrow | ||
-XX:ReservedCodeCacheSize=256M | ||
-XX:PerMethodRecompilationCutoff=10000 | ||
-XX:PerBytecodeRecompilationCutoff=10000 | ||
-Djdk.attach.allowAttachSelf=true | ||
-Djdk.nio.maxCachedBufferSize=2000000 | ||
# Allow loading dynamic agent used by JOL | ||
-XX:+EnableDynamicAgentLoading |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Enable verbose logging from Trino | ||
#io.trino=DEBUG |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node.environment=docker | ||
node.data-dir=/data/trino |
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
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