1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 11:58:47 +00:00
dockerfiles/prestodb/README.md

49 lines
1.1 KiB
Markdown
Raw Normal View History

2019-10-21 03:36:26 +00:00
prestodb
========
[Presto][1] is an open source distributed SQL query engine for running
interactive analytic queries against data sources of all sizes ranging from
gigabytes to petabytes.
## standalone mode
```yaml
prestodb:
image: vimagick/prestodb
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 prestodb
$ docker service update --replicas-max-per-node=1 prestodb_worker
2019-10-21 14:02:39 +00:00
$ docker service update --replicas=10 prestodb_worker
2019-10-21 03:36:26 +00:00
$ docker ps | grep prestodb_coordinator | awk '{print $1}'
4cc5c6c420d7
2019-10-21 14:02:39 +00:00
$ docker exec -it 4cc5c6c420d7 presto --server localhost:8080 --catalog tpch
2019-10-21 03:36:26 +00:00
>>> 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://prestodb.github.io/