danhuawang commented on code in PR #111:
URL:
https://github.com/apache/gravitino-playground/pull/111#discussion_r1976246459
##########
init/common/init_metalake_catalog.sh:
##########
@@ -78,9 +90,12 @@ if echo "$response" | grep -q "\"code\":0"; then
true
else
# Create Iceberg catalog for experience Gravitino service
- response=$(curl -X POST -H "Accept: application/vnd.gravitino.v1+json" -H
"Content-Type: application/json" -d '{ "name":"catalog_iceberg",
"type":"RELATIONAL", "provider":"lakehouse-iceberg", "comment":"comment",
"properties":{ "uri":"jdbc:mysql://'${MYSQL_HOST_IP}':3306/db",
"catalog-backend":"jdbc",
"warehouse":"hdfs://'${HIVE_HOST_IP}':9000/user/iceberg/warehouse/",
"jdbc-user":"mysql", "jdbc-password":"mysql",
"jdbc-driver":"com.mysql.cj.jdbc.Driver"} }'
http://gravitino:8090/api/metalakes/metalake_demo/catalogs)
+ response=$(curl -X POST -H "Accept: application/vnd.gravitino.v1+json" -H
"Content-Type: application/json" -d '{ "name":"catalog_iceberg",
"type":"RELATIONAL", "provider":"lakehouse-iceberg", "comment":"comment",
"properties":{ "uri":"jdbc:mysql://mysql:3306/db", "catalog-backend":"jdbc",
"warehouse":"hdfs://hive:9000/user/iceberg/warehouse/", "jdbc-user":"mysql",
"jdbc-password":"mysql", "jdbc-driver":"com.mysql.cj.jdbc.Driver"} }'
http://gravitino:8090/api/metalakes/metalake_demo/catalogs)
Review Comment:
Why replace the environment variable `${HIVE_HOST_IP}`,`MYSQL_HOST_IP`?
The Trino in docker-compose.yaml defined the environment variables.
```
trino:
image: apache/gravitino-playground:trino-435-gravitino-0.8.0-incubating
ports:
- "18080:8080"
container_name: playground-trino
environment:
- HADOOP_USER_NAME=root
- GRAVITINO_HOST_IP=gravitino
- GRAVITINO_HOST_PORT=8090
- GRAVITINO_METALAKE_NAME=metalake_demo
- HIVE_HOST_IP=hive
- MYSQL_HOST_IP=mysql
- POSTGRES_HOST_IP=postgresql
entrypoint: /bin/bash /tmp/trino/init.sh
volumes:
- ./init/trino:/tmp/trino
- ./init/common:/tmp/common
- ./healthcheck:/tmp/healthcheck
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]