From 82c64de017d01d2bca595ef9b16e0acfe578d801 Mon Sep 17 00:00:00 2001 From: kev Date: Tue, 21 Aug 2018 17:02:50 +0800 Subject: [PATCH] add presto --- README.md | 1 + presto/Dockerfile | 24 +++++++++++++++++++ presto/README.md | 4 ++++ .../conf/coordinator/catalog/jmx.properties | 1 + .../conf/coordinator/catalog/tpcds.properties | 1 + .../conf/coordinator/catalog/tpch.properties | 1 + presto/conf/coordinator/config.properties | 7 ++++++ presto/conf/coordinator/jvm.config | 9 +++++++ presto/conf/coordinator/log.properties | 1 + presto/conf/coordinator/node.properties | 3 +++ presto/conf/standalone/catalog/jmx.properties | 1 + .../conf/standalone/catalog/tpcds.properties | 1 + .../conf/standalone/catalog/tpch.properties | 1 + presto/conf/standalone/config.properties | 7 ++++++ presto/conf/standalone/jvm.config | 9 +++++++ presto/conf/standalone/log.properties | 1 + presto/conf/standalone/node.properties | 3 +++ presto/conf/worker/catalog/jmx.properties | 1 + presto/conf/worker/catalog/tpcds.properties | 1 + presto/conf/worker/catalog/tpch.properties | 1 + presto/conf/worker/config.properties | 5 ++++ presto/conf/worker/jvm.config | 9 +++++++ presto/conf/worker/log.properties | 1 + presto/conf/worker/node.properties | 3 +++ presto/docker-compose.yml | 19 +++++++++++++++ 25 files changed, 115 insertions(+) create mode 100644 presto/Dockerfile create mode 100644 presto/README.md create mode 100644 presto/conf/coordinator/catalog/jmx.properties create mode 100644 presto/conf/coordinator/catalog/tpcds.properties create mode 100644 presto/conf/coordinator/catalog/tpch.properties create mode 100644 presto/conf/coordinator/config.properties create mode 100644 presto/conf/coordinator/jvm.config create mode 100644 presto/conf/coordinator/log.properties create mode 100644 presto/conf/coordinator/node.properties create mode 100644 presto/conf/standalone/catalog/jmx.properties create mode 100644 presto/conf/standalone/catalog/tpcds.properties create mode 100644 presto/conf/standalone/catalog/tpch.properties create mode 100644 presto/conf/standalone/config.properties create mode 100644 presto/conf/standalone/jvm.config create mode 100644 presto/conf/standalone/log.properties create mode 100644 presto/conf/standalone/node.properties create mode 100644 presto/conf/worker/catalog/jmx.properties create mode 100644 presto/conf/worker/catalog/tpcds.properties create mode 100644 presto/conf/worker/catalog/tpch.properties create mode 100644 presto/conf/worker/config.properties create mode 100644 presto/conf/worker/jvm.config create mode 100644 presto/conf/worker/log.properties create mode 100644 presto/conf/worker/node.properties create mode 100644 presto/docker-compose.yml diff --git a/README.md b/README.md index f5c0e33..cf19efe 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ A collection of delicious docker recipes. - [x] kafka-arm - [x] kafka-manager +- [x] presto - [x] superset-arm - [x] zookeeper-arm diff --git a/presto/Dockerfile b/presto/Dockerfile new file mode 100644 index 0000000..14607cd --- /dev/null +++ b/presto/Dockerfile @@ -0,0 +1,24 @@ +# +# Dockerfile for presto +# + +FROM java:8-jre-alpine +MAINTAINER kev + +ENV PRESTO_VERSION 0.208 +ENV PRESTO_URL https://repo1.maven.org/maven2/com/facebook/presto/presto-server/$PRESTO_VERSION/presto-server-$PRESTO_VERSION.tar.gz +ENV PRESTO_HOME /opt/presto + +WORKDIR $PRESTO_HOME + +RUN set -xe \ + && apk add --no-cache curl tar \ + && curl -sSL $PRESTO_URL | tar xz --strip 1 \ + && apk del curl tar + +VOLUME /var/presto/data + +EXPOSE 8080 8081 + +ENTRYPOINT ["./bin/launcher"] +CMD ["run"] diff --git a/presto/README.md b/presto/README.md new file mode 100644 index 0000000..7708b9e --- /dev/null +++ b/presto/README.md @@ -0,0 +1,4 @@ +presto +====== + +https://prestodb.io/ diff --git a/presto/conf/coordinator/catalog/jmx.properties b/presto/conf/coordinator/catalog/jmx.properties new file mode 100644 index 0000000..b6e0372 --- /dev/null +++ b/presto/conf/coordinator/catalog/jmx.properties @@ -0,0 +1 @@ +connector.name=jmx diff --git a/presto/conf/coordinator/catalog/tpcds.properties b/presto/conf/coordinator/catalog/tpcds.properties new file mode 100644 index 0000000..ba8147d --- /dev/null +++ b/presto/conf/coordinator/catalog/tpcds.properties @@ -0,0 +1 @@ +connector.name=tpcds diff --git a/presto/conf/coordinator/catalog/tpch.properties b/presto/conf/coordinator/catalog/tpch.properties new file mode 100644 index 0000000..75110c5 --- /dev/null +++ b/presto/conf/coordinator/catalog/tpch.properties @@ -0,0 +1 @@ +connector.name=tpch diff --git a/presto/conf/coordinator/config.properties b/presto/conf/coordinator/config.properties new file mode 100644 index 0000000..48d532e --- /dev/null +++ b/presto/conf/coordinator/config.properties @@ -0,0 +1,7 @@ +coordinator=true +node-scheduler.include-coordinator=false +http-server.http.port=8080 +query.max-memory=50GB +query.max-memory-per-node=1GB +discovery-server.enabled=true +discovery.uri=http://coordinator:8080 diff --git a/presto/conf/coordinator/jvm.config b/presto/conf/coordinator/jvm.config new file mode 100644 index 0000000..afd8e8a --- /dev/null +++ b/presto/conf/coordinator/jvm.config @@ -0,0 +1,9 @@ +-server +-Xmx16G +-XX:+UseG1GC +-XX:G1HeapRegionSize=32M +-XX:+UseGCOverheadLimit +-XX:+ExplicitGCInvokesConcurrent +-XX:+HeapDumpOnOutOfMemoryError +-XX:+ExitOnOutOfMemoryError +-XX:OnOutOfMemoryError=kill -9 %p diff --git a/presto/conf/coordinator/log.properties b/presto/conf/coordinator/log.properties new file mode 100644 index 0000000..1c52627 --- /dev/null +++ b/presto/conf/coordinator/log.properties @@ -0,0 +1 @@ +com.facebook.presto=INFO diff --git a/presto/conf/coordinator/node.properties b/presto/conf/coordinator/node.properties new file mode 100644 index 0000000..aeffa9b --- /dev/null +++ b/presto/conf/coordinator/node.properties @@ -0,0 +1,3 @@ +node.environment=production +node.id=coordinator +node.data-dir=/var/presto/data diff --git a/presto/conf/standalone/catalog/jmx.properties b/presto/conf/standalone/catalog/jmx.properties new file mode 100644 index 0000000..b6e0372 --- /dev/null +++ b/presto/conf/standalone/catalog/jmx.properties @@ -0,0 +1 @@ +connector.name=jmx diff --git a/presto/conf/standalone/catalog/tpcds.properties b/presto/conf/standalone/catalog/tpcds.properties new file mode 100644 index 0000000..ba8147d --- /dev/null +++ b/presto/conf/standalone/catalog/tpcds.properties @@ -0,0 +1 @@ +connector.name=tpcds diff --git a/presto/conf/standalone/catalog/tpch.properties b/presto/conf/standalone/catalog/tpch.properties new file mode 100644 index 0000000..75110c5 --- /dev/null +++ b/presto/conf/standalone/catalog/tpch.properties @@ -0,0 +1 @@ +connector.name=tpch diff --git a/presto/conf/standalone/config.properties b/presto/conf/standalone/config.properties new file mode 100644 index 0000000..ccf2afd --- /dev/null +++ b/presto/conf/standalone/config.properties @@ -0,0 +1,7 @@ +coordinator=true +node-scheduler.include-coordinator=true +http-server.http.port=8080 +query.max-memory=5GB +query.max-memory-per-node=1GB +discovery-server.enabled=true +discovery.uri=http://coordinator:8080 diff --git a/presto/conf/standalone/jvm.config b/presto/conf/standalone/jvm.config new file mode 100644 index 0000000..afd8e8a --- /dev/null +++ b/presto/conf/standalone/jvm.config @@ -0,0 +1,9 @@ +-server +-Xmx16G +-XX:+UseG1GC +-XX:G1HeapRegionSize=32M +-XX:+UseGCOverheadLimit +-XX:+ExplicitGCInvokesConcurrent +-XX:+HeapDumpOnOutOfMemoryError +-XX:+ExitOnOutOfMemoryError +-XX:OnOutOfMemoryError=kill -9 %p diff --git a/presto/conf/standalone/log.properties b/presto/conf/standalone/log.properties new file mode 100644 index 0000000..1c52627 --- /dev/null +++ b/presto/conf/standalone/log.properties @@ -0,0 +1 @@ +com.facebook.presto=INFO diff --git a/presto/conf/standalone/node.properties b/presto/conf/standalone/node.properties new file mode 100644 index 0000000..aeffa9b --- /dev/null +++ b/presto/conf/standalone/node.properties @@ -0,0 +1,3 @@ +node.environment=production +node.id=coordinator +node.data-dir=/var/presto/data diff --git a/presto/conf/worker/catalog/jmx.properties b/presto/conf/worker/catalog/jmx.properties new file mode 100644 index 0000000..b6e0372 --- /dev/null +++ b/presto/conf/worker/catalog/jmx.properties @@ -0,0 +1 @@ +connector.name=jmx diff --git a/presto/conf/worker/catalog/tpcds.properties b/presto/conf/worker/catalog/tpcds.properties new file mode 100644 index 0000000..ba8147d --- /dev/null +++ b/presto/conf/worker/catalog/tpcds.properties @@ -0,0 +1 @@ +connector.name=tpcds diff --git a/presto/conf/worker/catalog/tpch.properties b/presto/conf/worker/catalog/tpch.properties new file mode 100644 index 0000000..75110c5 --- /dev/null +++ b/presto/conf/worker/catalog/tpch.properties @@ -0,0 +1 @@ +connector.name=tpch diff --git a/presto/conf/worker/config.properties b/presto/conf/worker/config.properties new file mode 100644 index 0000000..3da9ddd --- /dev/null +++ b/presto/conf/worker/config.properties @@ -0,0 +1,5 @@ +coordinator=false +http-server.http.port=8080 +query.max-memory=50GB +query.max-memory-per-node=1GB +discovery.uri=http://coordinator:8080 diff --git a/presto/conf/worker/jvm.config b/presto/conf/worker/jvm.config new file mode 100644 index 0000000..afd8e8a --- /dev/null +++ b/presto/conf/worker/jvm.config @@ -0,0 +1,9 @@ +-server +-Xmx16G +-XX:+UseG1GC +-XX:G1HeapRegionSize=32M +-XX:+UseGCOverheadLimit +-XX:+ExplicitGCInvokesConcurrent +-XX:+HeapDumpOnOutOfMemoryError +-XX:+ExitOnOutOfMemoryError +-XX:OnOutOfMemoryError=kill -9 %p diff --git a/presto/conf/worker/log.properties b/presto/conf/worker/log.properties new file mode 100644 index 0000000..1c52627 --- /dev/null +++ b/presto/conf/worker/log.properties @@ -0,0 +1 @@ +com.facebook.presto=INFO diff --git a/presto/conf/worker/node.properties b/presto/conf/worker/node.properties new file mode 100644 index 0000000..51c198c --- /dev/null +++ b/presto/conf/worker/node.properties @@ -0,0 +1,3 @@ +node.environment=production +node.id=worker +node.data-dir=/var/presto/data diff --git a/presto/docker-compose.yml b/presto/docker-compose.yml new file mode 100644 index 0000000..740dda4 --- /dev/null +++ b/presto/docker-compose.yml @@ -0,0 +1,19 @@ +coordinator: + image: vimagick/presto + ports: + - "8080:8080" + volumes: + - ./conf/coordinator:/opt/presto/etc + - ./data/coordinator:/var/lib/presto + restart: always + +worker: + image: vimagick/presto + ports: + - "8081:8081" + volumes: + - ./conf/worker:/opt/presto/etc + - ./data/worker:/var/lib/presto + links: + - coordinator + restart: always