1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:36 +02:00

update presto

This commit is contained in:
kev 2019-10-21 22:02:39 +08:00
parent 3185a204b4
commit 88611cf426
28 changed files with 121 additions and 9 deletions

View File

@ -14,7 +14,7 @@ ENV PATH=${PRESTO_HOME}/bin:${PATH}
WORKDIR $PRESTO_HOME
RUN set -xe \
&& apk add --no-cache curl python tar \
&& apk add --no-cache curl less python tar \
&& curl -sSL $PRESTO_SERVER_URL | tar xz --strip 1 \
&& curl -sSL $PRESTO_CLI_URL > ./bin/presto \
&& chmod +x ./bin/presto \

View File

@ -27,12 +27,12 @@ $ docker stack deploy -c docker-stack.yml prestodb
$ docker service update --replicas-max-per-node=1 prestodb_worker
$ docker service update --replicas 10 prestodb_worker
$ docker service update --replicas=10 prestodb_worker
$ docker ps | grep prestodb_coordinator | awk '{print $1}'
4cc5c6c420d7
$ docker exec -it 4cc5c6c420d7 prestodb --server localhost:8080 --catalog tpch
$ docker exec -it 4cc5c6c420d7 presto --server localhost:8080 --catalog tpch
>>> show schemas;
>>> show tables from tiny;
>>> select * from tiny.customer limit 10;

View File

@ -14,12 +14,12 @@ services:
placement:
constraints:
- node.role == manager
- node.hostname == presto-coordinator
restart_policy:
condition: on-failure
worker:
image: vimagick/prestodb:alpine
entrypoint: sh -c 'launcher run -Dnode.id=$$HOSTNAME'
volumes:
- /data:/data
- prestodb_worker_conf:/opt/presto/etc

View File

@ -14,7 +14,7 @@ ENV PATH=${PRESTO_HOME}/bin:${PATH}
WORKDIR $PRESTO_HOME
RUN set -xe \
&& apk add --no-cache curl python tar \
&& apk add --no-cache curl less python tar \
&& curl -sSL $PRESTO_SERVER_URL | tar xz --strip 1 \
&& curl -sSL $PRESTO_CLI_URL > ./bin/presto \
&& chmod +x ./bin/presto \

View File

@ -1,5 +1,5 @@
#
# Dockerfile for presto-ce
# Dockerfile for prestosql
#
FROM openjdk:8-jre-slim-buster

View File

@ -1,6 +1,46 @@
prestosql
=========
========
[Presto][1] is a high performance, distributed SQL query engine for big data.
[1]: https://prestosql.io
## standalone mode
```yaml
prestosql:
image: vimagick/prestosql:alpine
ports:
- "8080:8080"
volumes:
- ./conf/standalone:/opt/presto/etc:ro
- /data:/data
restart: unless-stopped
```
## cluster mode
```bash
$ ansible all -a 'mkdir -p /data'
$ docker stack deploy -c docker-stack.yml prestosql
$ docker service update --replicas-max-per-node=1 prestosql_worker
$ docker service update --replicas=10 prestosql_worker
$ docker ps | grep prestosql_coordinator | awk '{print $1}'
4cc5c6c420d7
$ docker exec -it 4cc5c6c420d7 presto --server localhost:8080 --catalog tpch
>>> show schemas;
>>> show tables from tiny;
>>> select * from tiny.customer limit 10;
>>> quit
$ curl http://localhost:8080/ui/
$ curl http://localhost:8080/v1/service/presto/general
```
> :warning: If volume settings are changed, you need to remove them manually on all nodes.
[1]: https://prestosql.io/

View File

@ -0,0 +1 @@
connector.name=jmx

View File

@ -0,0 +1 @@
connector.name=tpcds

View File

@ -0,0 +1 @@
connector.name=tpch

View File

@ -0,0 +1,9 @@
coordinator=true
node-scheduler.include-coordinator=false
http-server.http.port=8080
query.max-memory=50GB
query.max-memory-per-node=1GB
query.max-total-memory-per-node=2GB
discovery-server.enabled=true
discovery.uri=http://127.0.0.1:8080
node.internal-address=coordinator

View File

@ -0,0 +1,9 @@
-server
-Xmx16G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
-XX:OnOutOfMemoryError=kill -9 %p

View File

@ -0,0 +1 @@
com.facebook.presto=INFO

View File

@ -0,0 +1,3 @@
node.environment=production
node.data-dir=/data
node.id=coordinator

View File

@ -0,0 +1 @@
connector.name=jmx

View File

@ -0,0 +1 @@
connector.name=tpcds

View File

@ -0,0 +1 @@
connector.name=tpch

View File

@ -0,0 +1,8 @@
coordinator=true
node-scheduler.include-coordinator=true
http-server.http.port=8080
query.max-memory=5GB
query.max-memory-per-node=1GB
query.max-total-memory-per-node=2GB
discovery-server.enabled=true
discovery.uri=http://127.0.0.1:8080

View File

@ -0,0 +1,9 @@
-server
-Xmx16G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
-XX:OnOutOfMemoryError=kill -9 %p

View File

@ -0,0 +1 @@
com.facebook.presto=INFO

View File

@ -0,0 +1,3 @@
node.environment=production
node.data-dir=/data
node.id=standalone

View File

@ -0,0 +1 @@
connector.name=jmx

View File

@ -0,0 +1 @@
connector.name=tpcds

View File

@ -0,0 +1 @@
connector.name=tpch

View File

@ -0,0 +1,7 @@
coordinator=false
http-server.http.port=8080
query.max-memory=50GB
query.max-memory-per-node=1GB
query.max-total-memory-per-node=2GB
discovery.uri=http://coordinator:8080
#node.internal-address=worker1

View File

@ -0,0 +1,9 @@
-server
-Xmx16G
-XX:+UseG1GC
-XX:G1HeapRegionSize=32M
-XX:+UseGCOverheadLimit
-XX:+ExplicitGCInvokesConcurrent
-XX:+HeapDumpOnOutOfMemoryError
-XX:+ExitOnOutOfMemoryError
-XX:OnOutOfMemoryError=kill -9 %p

View File

@ -0,0 +1 @@
com.facebook.presto=INFO

View File

@ -0,0 +1,3 @@
node.environment=production
node.data-dir=/data
#node.id=worker1

View File

@ -14,12 +14,12 @@ services:
placement:
constraints:
- node.role == manager
- node.hostname == presto-coordinator
restart_policy:
condition: on-failure
worker:
image: vimagick/prestosql:alpine
entrypoint: sh -c 'launcher run -Dnode.id=$$HOSTNAME'
volumes:
- /data:/data
- prestosql_worker_conf:/opt/presto/etc