mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-04-13 11:40:41 +02:00
update presto
This commit is contained in:
parent
3185a204b4
commit
88611cf426
@ -14,7 +14,7 @@ ENV PATH=${PRESTO_HOME}/bin:${PATH}
|
|||||||
WORKDIR $PRESTO_HOME
|
WORKDIR $PRESTO_HOME
|
||||||
|
|
||||||
RUN set -xe \
|
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_SERVER_URL | tar xz --strip 1 \
|
||||||
&& curl -sSL $PRESTO_CLI_URL > ./bin/presto \
|
&& curl -sSL $PRESTO_CLI_URL > ./bin/presto \
|
||||||
&& chmod +x ./bin/presto \
|
&& chmod +x ./bin/presto \
|
||||||
|
@ -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-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}'
|
$ docker ps | grep prestodb_coordinator | awk '{print $1}'
|
||||||
4cc5c6c420d7
|
4cc5c6c420d7
|
||||||
|
|
||||||
$ docker exec -it 4cc5c6c420d7 prestodb --server localhost:8080 --catalog tpch
|
$ docker exec -it 4cc5c6c420d7 presto --server localhost:8080 --catalog tpch
|
||||||
>>> show schemas;
|
>>> show schemas;
|
||||||
>>> show tables from tiny;
|
>>> show tables from tiny;
|
||||||
>>> select * from tiny.customer limit 10;
|
>>> select * from tiny.customer limit 10;
|
||||||
|
@ -14,12 +14,12 @@ services:
|
|||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
- node.role == manager
|
- node.role == manager
|
||||||
- node.hostname == presto-coordinator
|
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
image: vimagick/prestodb:alpine
|
image: vimagick/prestodb:alpine
|
||||||
|
entrypoint: sh -c 'launcher run -Dnode.id=$$HOSTNAME'
|
||||||
volumes:
|
volumes:
|
||||||
- /data:/data
|
- /data:/data
|
||||||
- prestodb_worker_conf:/opt/presto/etc
|
- prestodb_worker_conf:/opt/presto/etc
|
||||||
|
@ -14,7 +14,7 @@ ENV PATH=${PRESTO_HOME}/bin:${PATH}
|
|||||||
WORKDIR $PRESTO_HOME
|
WORKDIR $PRESTO_HOME
|
||||||
|
|
||||||
RUN set -xe \
|
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_SERVER_URL | tar xz --strip 1 \
|
||||||
&& curl -sSL $PRESTO_CLI_URL > ./bin/presto \
|
&& curl -sSL $PRESTO_CLI_URL > ./bin/presto \
|
||||||
&& chmod +x ./bin/presto \
|
&& chmod +x ./bin/presto \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Dockerfile for presto-ce
|
# Dockerfile for prestosql
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM openjdk:8-jre-slim-buster
|
FROM openjdk:8-jre-slim-buster
|
||||||
|
@ -1,6 +1,46 @@
|
|||||||
prestosql
|
prestosql
|
||||||
=========
|
========
|
||||||
|
|
||||||
[Presto][1] is a high performance, distributed SQL query engine for big data.
|
[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/
|
||||||
|
1
prestosql/conf/coordinator/catalog/jmx.properties
Normal file
1
prestosql/conf/coordinator/catalog/jmx.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
connector.name=jmx
|
1
prestosql/conf/coordinator/catalog/tpcds.properties
Normal file
1
prestosql/conf/coordinator/catalog/tpcds.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
connector.name=tpcds
|
1
prestosql/conf/coordinator/catalog/tpch.properties
Normal file
1
prestosql/conf/coordinator/catalog/tpch.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
connector.name=tpch
|
9
prestosql/conf/coordinator/config.properties
Normal file
9
prestosql/conf/coordinator/config.properties
Normal 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
|
9
prestosql/conf/coordinator/jvm.config
Normal file
9
prestosql/conf/coordinator/jvm.config
Normal 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
|
1
prestosql/conf/coordinator/log.properties
Normal file
1
prestosql/conf/coordinator/log.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
com.facebook.presto=INFO
|
3
prestosql/conf/coordinator/node.properties
Normal file
3
prestosql/conf/coordinator/node.properties
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
node.environment=production
|
||||||
|
node.data-dir=/data
|
||||||
|
node.id=coordinator
|
1
prestosql/conf/standalone/catalog/jmx.properties
Normal file
1
prestosql/conf/standalone/catalog/jmx.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
connector.name=jmx
|
1
prestosql/conf/standalone/catalog/tpcds.properties
Normal file
1
prestosql/conf/standalone/catalog/tpcds.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
connector.name=tpcds
|
1
prestosql/conf/standalone/catalog/tpch.properties
Normal file
1
prestosql/conf/standalone/catalog/tpch.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
connector.name=tpch
|
8
prestosql/conf/standalone/config.properties
Normal file
8
prestosql/conf/standalone/config.properties
Normal 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
|
9
prestosql/conf/standalone/jvm.config
Normal file
9
prestosql/conf/standalone/jvm.config
Normal 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
|
1
prestosql/conf/standalone/log.properties
Normal file
1
prestosql/conf/standalone/log.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
com.facebook.presto=INFO
|
3
prestosql/conf/standalone/node.properties
Normal file
3
prestosql/conf/standalone/node.properties
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
node.environment=production
|
||||||
|
node.data-dir=/data
|
||||||
|
node.id=standalone
|
1
prestosql/conf/worker/catalog/jmx.properties
Normal file
1
prestosql/conf/worker/catalog/jmx.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
connector.name=jmx
|
1
prestosql/conf/worker/catalog/tpcds.properties
Normal file
1
prestosql/conf/worker/catalog/tpcds.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
connector.name=tpcds
|
1
prestosql/conf/worker/catalog/tpch.properties
Normal file
1
prestosql/conf/worker/catalog/tpch.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
connector.name=tpch
|
7
prestosql/conf/worker/config.properties
Normal file
7
prestosql/conf/worker/config.properties
Normal 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
|
9
prestosql/conf/worker/jvm.config
Normal file
9
prestosql/conf/worker/jvm.config
Normal 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
|
1
prestosql/conf/worker/log.properties
Normal file
1
prestosql/conf/worker/log.properties
Normal file
@ -0,0 +1 @@
|
|||||||
|
com.facebook.presto=INFO
|
3
prestosql/conf/worker/node.properties
Normal file
3
prestosql/conf/worker/node.properties
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
node.environment=production
|
||||||
|
node.data-dir=/data
|
||||||
|
#node.id=worker1
|
@ -14,12 +14,12 @@ services:
|
|||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
- node.role == manager
|
- node.role == manager
|
||||||
- node.hostname == presto-coordinator
|
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
|
|
||||||
worker:
|
worker:
|
||||||
image: vimagick/prestosql:alpine
|
image: vimagick/prestosql:alpine
|
||||||
|
entrypoint: sh -c 'launcher run -Dnode.id=$$HOSTNAME'
|
||||||
volumes:
|
volumes:
|
||||||
- /data:/data
|
- /data:/data
|
||||||
- prestosql_worker_conf:/opt/presto/etc
|
- prestosql_worker_conf:/opt/presto/etc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user