Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Upgrade to 364 #80

Merged
merged 3 commits into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

## Build a container image including this connector

It uses multi-stage build and the prestosql container image from community as the
It uses multi-stage build and the trinodb container image from community as the
base image.

docker build -t "<name>/<tag>" --build-arg BASE="prestosql/presto:347" .
docker build -t "<name>/<tag>" --build-arg BASE="trinodb/trino:<trino_verson_from_pom>" .

## Testing

Expand All @@ -25,30 +25,30 @@ I'd recommend following this process to iterate:
keep code changes in a branch.
1. Run `mvn clean install` or the Maven tool window of the IDE to build this
connector, while addressing errors/problems from build output.
1. Config a separate prestosql server with the built connector by creating a file
1. Config a separate trinodb server with the built connector by creating a file
named `docker-compose.yml`:
```YAML
# docker-compose.yml
version: "3.7"

services:
presto-coordinator:
image: prestosql/presto:347
container_name: presto-coordinator
trino-coordinator:
image: trinodb/trino:<trino_verson_from_pom>
container_name: trino-coordinator
volumes:
- source: ./target/presto-db2-347
target: /usr/lib/presto/plugin/db2
- source: ./target/trino-db2-<trino_verson_from_pom>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it still points to presto-db2 in Dockerfile

WORKDIR /root/presto-db2

Should the source and target be presto-db2 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice that nothing really seems to even use the Dockerfile. The image that is being used in the suggested docker-compose.yaml is based on the upstream image on dockerhub. I think the Dockerfile is kind of an artifact at this point.

target: /usr/lib/trino/plugin/db2
type: bind
- source: ./conf/presto
target: /etc/presto
- source: ./conf/trino
target: /etc/trino
type: bind
ports:
- "8080:8080"
```
1. Make sure creating a connector config under `./conf/presto/catalog` to connect
1. Make sure creating a connector config under `./conf/trino/catalog` to connect
to an actual Db2 database. see details from [Connection Configuration](README.md#connection-configuration).
1. Start this local prestosql server by running `docker-compose up -d`
1. Connect to this local prestosql server via CLI to perform queries while
capturing server output from container logs by running command `docker logs presto-coordinator`.
1. If changing Java code, delete this local prestosql server by running command
`docker-compose down` then start from step 2.
1. Start this local trinodb server by running `docker-compose up -d`
1. Connect to this local trinodb server via CLI to perform queries while
capturing server output from container logs by running command `docker logs trino-coordinator`.
1. If changing Java code, delete this local trinodb server by running command
`docker-compose down` then start from step 2.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.trino</groupId>
<artifactId>trino-root</artifactId>
<version>363</version>
<version>364</version>
</parent>

<artifactId>trino-db2</artifactId>
Expand Down