-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Trino Alluxio Iceberg Minio
lucyge2022 edited this page Jan 23, 2024
·
1 revision
Successful setup from community user (Roman Klimenko) on 01/18/2024, kept here as reference.
follow this doc: https://github.com/bitsondatadev/trino-getting-started/blob/main/iceberg/trino-alluxio-iceberg-minio/README.md
image versions in original docker-compose.yaml needs to be updated with
- image: 'trinodb/trino:422' (instead of 'trinodb/trino:latest' under trino-coordinator)
- image: 'alluxio/alluxio:2.9.3' (instead of 'alluxio/alluxio:latest' under alluxio-leader)
- entrypoint: all "2.9.0" -> "2.9.3" (under hive-metastore)
Unfortunately starting with Trino:423 will get an error
- Invalid location URI: alluxio://alluxio-leader:19998/lakehouse
- Trino shows it as: org.apache.hadoop.fs.UnsupportedFileSystemException: No FileSystem for scheme "alluxio" while trying to create a schema.
The working docker-compose.yaml is as follows:
version: '3.9'
services:
trino-coordinator:
image: 'trinodb/trino:422'
hostname: trino-coordinator
ports:
- '8080:8080'
volumes:
- ./etc:/etc/trino
networks:
- trino-network
alluxio-leader:
image: 'alluxio/alluxio:2.9.3'
hostname: alluxio-leader
ports:
- '19998:19998'
- '19999:19999'
environment:
ALLUXIO_JAVA_OPTS: " \
-Dalluxio.master.hostname=alluxio-leader \
-Dalluxio.master.mount.table.root.ufs=s3://alluxio/ \
-Dalluxio.underfs.s3.endpoint=http://minio:9000 \
-Dalluxio.underfs.s3.disable.dns.buckets=true \
-Dalluxio.underfs.s3.inherit.acl=false \
-Daws.accessKeyId=minio \
-Daws.secretKey=minio123 \
-Dalluxio.security.authorization.permission.enabled=false" # This is only set for demonstration purposes
command: master
networks:
- trino-network
alluxio-follower:
image: 'alluxio/alluxio:latest'
hostname: alluxio-follower
ports:
- '29999:29999'
- '30000:30000'
shm_size: 1G
environment:
ALLUXIO_JAVA_OPTS: " \
-Dalluxio.worker.ramdisk.size=1G \
-Dalluxio.master.hostname=alluxio-leader \
-Dalluxio.worker.hostname=alluxio-follower \
-Dalluxio.underfs.s3.endpoint=http://minio:9000 \
-Dalluxio.underfs.s3.disable.dns.buckets=true \
-Dalluxio.underfs.s3.inherit.acl=false \
-Daws.accessKeyId=minio \
-Daws.secretKey=minio123 \
-Dalluxio.security.authorization.permission.enabled=false" # This is only set for demonstration purposes
command: worker
networks:
- trino-network
mariadb:
image: 'mariadb:latest'
hostname: mariadb
ports:
- '3306:3306'
environment:
MYSQL_ROOT_PASSWORD: admin
MYSQL_USER: admin
MYSQL_PASSWORD: admin
MYSQL_DATABASE: metastore_db
networks:
- trino-network
hive-metastore:
hostname: hive-metastore
image: 'bitsondatadev/hive-metastore:latest'
ports:
- '9083:9083' # Metastore Thrift
volumes:
- ./conf/metastore-site.xml:/opt/apache-hive-metastore-3.0.0-bin/conf/metastore-site.xml:ro
environment:
METASTORE_DB_HOSTNAME: mariadb
depends_on:
- mariadb
networks:
- trino-network
entrypoint: >
/bin/sh -c "wget https://repo1.maven.org/maven2/org/alluxio/alluxio-shaded-client/2.9.3/alluxio-shaded-client-2.9.3.jar -O /opt/apache-hive-metastore-3.0.0-bin/lib/alluxio-2.9.3-client.jar; /entrypoint.sh"
minio:
hostname: minio
image: 'minio/minio:latest'
container_name: minio
ports:
- '9000:9000'
- '9001:9001'
volumes:
- minio-data:/data
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
command: server /data --console-address :9001
networks:
- trino-network
minio-setup:
depends_on:
- minio
image: minio/mc
container_name: mc
environment:
- MINIO_ACCESS_KEY=minio
- MINIO_SECRET_KEY=minio123
networks:
- trino-network
volumes:
- ./data:/tmp/data
entrypoint: >
/bin/sh -c "
until (/usr/bin/mc config host add minio http://minio:9000 minio minio123) do echo '...waiting...' && sleep 1; done;
/usr/bin/mc rm -r --force minio/alluxio;
/usr/bin/mc mb minio/alluxio;
/usr/bin/mc policy set public minio/alluxio;
exit 0;
"
volumes:
minio-data:
driver: local
networks:
trino-network:
driver: bridge