feat: add presto

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-08-06 00:02:20 +02:00
parent f345a956c9
commit 026a95790e
9 changed files with 74 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ services:
- SPARK_MASTER_URL=spark://spark:7077
- SPARK_WORKER_MEMORY=1G
- SPARK_WORKER_CORES=1
configs:
run_sql:
content: |

View File

@@ -0,0 +1,20 @@
services:
presto:
build:
context: .
dockerfile: presto.Dockerfile
container_name: presto
# trino:
# image: trinodb/trino
# ports:
# - 18080:8080
# configs:
# - source: iceberg_properties
# target: /etc/catalog/iceberg.properties
# configs:
# iceberg_properties:
# content: |
# connector.name=iceberg
# hive.metastore.uri=thrift://192.0.2.3:9083

View File

@@ -0,0 +1,22 @@
<configuration>
<property>
<name>presto.s3.endpoint</name>
<value>http://minio-0:9301</value>
</property>
<property>
<name>presto.s3.path-style-access</name>
<value>true</value>
</property>
<property>
<name>presto.s3.access-key</name>
<value>hummockadmin</value>
</property>
<property>
<name>presto.s3.secret-key</name>
<value>hummockadmin</value>
</property>
<property>
<name>fs.s3a.impl</name>
<value>com.facebook.presto.hive.s3.PrestoS3FileSystem</value>
</property>
</configuration>

View File

@@ -0,0 +1,5 @@
connector.name=iceberg
iceberg.catalog.type=hadoop
iceberg.catalog.warehouse=s3a://hummock001/iceberg-data
iceberg.hadoop.config.resources=/etc/iceberg/conf/hadoop-catalog.xml
hive.config.resources=/etc/iceberg/conf/hadoop-catalog.xml

2
templates/log.properties Normal file
View File

@@ -0,0 +1,2 @@
com.facebook.presto=DEBUG
org.apache.hadoop=DEBUG

View File

@@ -0,0 +1,5 @@
FROM prestodb/presto
COPY ./iceberg.properties /opt/presto-server/etc/catalog
COPY ./log.properties /opt/presto-server/etc
COPY ./hadoop-catalog.xml /etc/iceberg/conf/hadoop-catalog.xml