• Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language Makefile
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Multiple node presto cluster on docker container

docker-trino-cluster CircleCI GitHub tag (latest by date) GitHub

docker-trino-cluster is a simple tool for launching multiple node trino cluster on docker container. The image is synched with the master branch of trino repository. Therefore you can try the latest trino for developing purpose easily.

Features

  • Multiple node cluster on docker container with docker-compose
  • Distribution of pre-build trino docker images
  • Override the catalog properties with custom one
  • Terraform module to launch ECS based cluster

Images

Role Image Pulls Tags
coordinator lewuathe/trino-coordinator Docker Pulls tags
worker lewuathe/trino-worker Docker Pulls tags

We are also providing ARM based images. Images for ARM have suffix -arm64v8 in the tag. For instance, the image of 336 has two types of images supporting multi-architectures. Following architectures are supported for now.

  • linux/amd64
  • linux/arm64/v8

Usage

Images are uploaded in DockerHub. These images are build with the corresponding version of trino. Image tagged with 306 uses trino 306 inside. Each docker image gets two arguments

Index Argument Description
1 discovery_uri Required parameter to specify the URI to coordinator host
2 node_id Optional parameter to specify the node identity. UUID will be generated if not given

You can launch multi node trino cluster in the local machine as follows.

# Create a custom network
$ docker network create trino_network

# Launch coordinator
$ docker run -p 8080:8080 -it \
    --net trino_network \
    --name coordinator \
    lewuathe/trino-coordinator:330-SNAPSHOT http://localhost:8080

# Launch two workers
$ docker run -it \
    --net trino_network \
    --name worker1 \
    lewuathe/trino-worker:330-SNAPSHOT http://coordinator:8080

$ docker run -it \
    --net trino_network \
    --name worker2 \
    lewuathe/trino-worker:330-SNAPSHOT http://coordinator:8080

docker-compose.yml

docker-compose enables us to coordinator multiple containers more easily. You can launch a multiple node docker trino cluster with the following yaml file. command is required to pass discovery URI and node id information which must be unique in a cluster. If node ID is not passed, the UUID is generated automatically at launch time.

version: '3'

services:
  coordinator:
    image: "lewuathe/trino-coordinator:${trino_VERSION}"
    ports:
      - "8080:8080"
    container_name: "coordinator"
    command: http://coordinator:8080 coordinator
  worker0:
    image: "lewuathe/trino-worker:${trino_VERSION}"
    container_name: "worker0"
    ports:
      - "8081:8081"
    command: http://coordinator:8080 worker0
  worker1:
    image: "lewuathe/trino-worker:${trino_VERSION}"
    container_name: "worker1"
    ports:
      - "8082:8081"
    command: http://coordinator:8080 worker1

The version can be specified as the environment variable.

$ trino_VERSION=330-SNAPSHOT docker-compose up

Custom Catalogs

While the image provides several default connectors (i.e. JMX, Memory, TPC-H and TPC-DS), you may want to override the catalog property with your own ones. That can be easily achieved by mounting the catalog directory onto /usr/local/trino/etc/catalog. Please look at volumes configuration for docker-compose.

services:
  coordinator:
    image: "lewuathe/trino-coordinator:${trino_VERSION}"
    ports:
      - "8080:8080"
    container_name: "coordinator"
    command: http://coordinator:8080 coordinator
    volumes:
      - ./example/etc/catalog:/usr/local/trino/etc/catalog

Terraform

You can launch trino cluster on AWS Fargate by using terraform-aws-trino module. The following Terraform configuration provides a trino cluster with 2 worker processes on Fargate.

module "trino" {
  source           = "github.com/Lewuathe/terraform-aws-trino"
  cluster_capacity = 2
}

output "alb_dns_name" {
  value = module.trino.alb_dns_name
}

Please see here for more detail.

Development

Build Image

$ make build

Snapshot Image

You may want to build the trino with your own build package for the development of trino itself.

$ cp /path/to/trino/trino-server/target/trino-server-330-SNAPSHOT.tar.gz /path/to/docker-trino-cluster/trino-base/
$ make snapshot

LICENSE

Apache v2 License

More Repositories

1

COVID19-SIR

COVID-19 SIR model estimation
Python
131
star
2

mlir-hello

MLIR Sample dialect
C++
101
star
3

docker-hadoop-cluster

Multiple node cluster on Docker for self development.
Shell
92
star
4

n42

Tiny Deep Learning module for Node.js
JavaScript
68
star
5

dllib

dllib is a distributed deep learning library running on Apache Spark
CSS
32
star
6

tf-sne

tf-sne is a light weight visualization tool on Tensorflow
Python
14
star
7

passport-yj

Oauth2.0 npm package for Yahoo! JAPAN corresponds to YConnect
JavaScript
11
star
8

SwiftCase

Case class implementation and matching DSL for Swift
Swift
10
star
9

storm-cookbook

Chef cookbook for storm
Ruby
8
star
10

robinhood

Comparison of RobinHood hashing algorithm
Go
7
star
11

spark-kaggle-examples

Kaggle Job repository
Scala
6
star
12

site-snapshot

Take a snapshot of your site while crawling
TypeScript
6
star
13

gimg

Printing image in terminal by ANSI/VT100 Control sequences
Go
5
star
14

node-yj

A Node.JS module, which provides an object oriented wrapper for the YJDN APIs.
JavaScript
5
star
15

java-GoF

Design patterns written in Java
Java
5
star
16

dropbox-github-action

5
star
17

PE

This is JavaScript physics engine.
JavaScript
4
star
18

hakoniwa

Simulation framework using LLM based entities to mimic the real-world persona behavior
Python
4
star
19

terraform-aws-presto

Terraform module to create Presto cluster
HCL
4
star
20

tiny-presto

Lightweight Presto pluster for verifying query result consistency
Ruby
3
star
21

LEStatsRequest

Statistics of Japan government request client
Objective-C
3
star
22

readonly

Simple reference restriction library between custom modules in node object.
JavaScript
3
star
23

lewuathe.github.io

The first cry of Atom
HTML
2
star
24

language-digdag

Adds syntax highlighting to Digdag files in Atom
2
star
25

cgit-cookbook

configuration and starting service of cgit
Ruby
2
star
26

oranch

Log file tracker library in node
JavaScript
2
star
27

obsidian-mlir-syntax-highlight

JavaScript
2
star
28

drill-cookbook

Chef cookbook for Apache Drill
Ruby
1
star
29

node-jp

Client of the statics data provided by the goverment of Japan.
JavaScript
1
star
30

hckrnews-plugin

Jenkins plugin for reading hacker news top time line.
Java
1
star
31

TensorFlow-StyleTransfer

Style Transfer in TensorFlow
Python
1
star
32

mybf

A implementation of BrainFuck in LLVM
C++
1
star
33

parse-spec

For ALL migrator from Parse.com! Testing tool for Parse.com REST API.
JavaScript
1
star
34

hadoop

My hadoop mirror repository
Java
1
star
35

embulk-formatter-geojson

Embulk formatter plugin for geojson
Ruby
1
star
36

kaggle-repo

My Kaggle programs
Python
1
star
37

omaha

Unified view of financial metrics of public companies
Python
1
star
38

fluent-plugin-finagle

Fluentd input plugin for Finagle metric
Ruby
1
star
39

docker-td-xgboost

Docker image for running XGBoost with Treasure Data
Python
1
star
40

Cipang

The utility iOS app for open data of Japan
Objective-C
1
star
41

storm-jubatus

Middleware between storm and jubatus
Java
1
star