tree: d2ef3fa7fdec0ecaec8f65cd157996d75eaf3ac3 [path history] [tgz]
  1. templates/
  2. Chart.yaml
  3. launch-presto-ui.sh
  4. pinot-presto-cli.sh
  5. presto-cli.sh
  6. presto-coordinator.yaml
  7. presto-worker.yaml
  8. README.md
  9. values.yaml
helm/presto/README.md

Pinot Presto Quickstart on Kubernetes with Helm

Prerequisite

How to setup a Presto cluster for demo

Start Presto with Helm

Below command will start one presto coordinator and one presto worker as an example.

helm install presto -n pinot-quickstart .

To check deployment status

kubectl get all -n pinot-quickstart

Presto UI

Please use below script to do local port-forwarding and open Presto UI on your web browser.

./launch-presto-ui.sh

Query Presto using Presto CLI

Once Presto is deployed, you could run below command.

./pinot-presto-cli.sh

or with your own command with custom parameters.

./presto-cli.sh --server localhost:8080 --catalog pinot --schema default

Sample queries to execute

  • List all catalogs
presto:default> show catalogs;
 Catalog
---------
 pinot
 system
(2 rows)

Query 20191112_050827_00003_xkm4g, FINISHED, 1 node
Splits: 19 total, 19 done (100.00%)
0:01 [0 rows, 0B] [0 rows/s, 0B/s]

  • List All tables
presto:default> show tables;
    Table
--------------
 airlinestats
(1 row)

Query 20191112_050907_00004_xkm4g, FINISHED, 1 node
Splits: 19 total, 19 done (100.00%)
0:01 [1 rows, 29B] [1 rows/s, 41B/s]
  • Show schema
presto:default> DESCRIBE pinot.dontcare.airlinestats;
        Column        |  Type   | Extra | Comment
----------------------+---------+-------+---------
 flightnum            | integer |       |
 origin               | varchar |       |
 quarter              | integer |       |
 lateaircraftdelay    | integer |       |
 divactualelapsedtime | integer |       |
......

Query 20191112_051021_00005_xkm4g, FINISHED, 1 node
Splits: 19 total, 19 done (100.00%)
0:02 [80 rows, 6.06KB] [35 rows/s, 2.66KB/s]
  • Count total documents
presto:default> select count(*) as cnt from pinot.dontcare.airlinestats limit 10;
 cnt
------
 9745
(1 row)

Query 20191112_051114_00006_xkm4g, FINISHED, 1 node
Splits: 17 total, 17 done (100.00%)
0:00 [1 rows, 8B] [2 rows/s, 19B/s]

Then you could verify the new worker nodes are added by:

presto:default> select * from system.runtime.nodes;
               node_id                |        http_uri        |      node_version      | coordinator | state
--------------------------------------+------------------------+------------------------+-------------+--------
 d7123f72-bdd4-417e-adc2-9cfed5bbb12c | http://10.1.0.165:8080 | 0.236-SNAPSHOT-dbf3a80 | true        | active
 fe9b8813-7bfc-4b4e-aa84-9d50c5e87c57 | http://10.1.0.166:8080 | 0.236-SNAPSHOT-dbf3a80 | false       | active
(2 rows)

Query 20200510_073256_00012_z6jp6, FINISHED, 2 nodes
Splits: 17 total, 17 done (100.00%)
0:00 [2 rows, 174B] [14 rows/s, 1.27KB/s]

Configuring the Chart

The chart can be customized using the following configurable parameters:

ParameterDescriptionDefault
image.repositoryPresto Container image repoapachepinot/pinot-presto
image.tagPresto Container image taglatest
image.pullPolicyPresto Container image pull policyIfNotPresent
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
pinot.connectorNameName of Pinot Connectorpinot
pinot.controllerUrlsPinot Controller URLspinot-controller:9000
pinot.controllerRestServicePinot Controller Rest Service URLspinot-controller:9000
pinot.allowMultipleAggregationsAllow Query with Multiple Aggregationstrue
pinot.useDateTruncAllow DateTrunc Function in Pinottrue
pinot.inferDateTypeInSchemaInfer a Pinot TimeFieldSpec/DateTimeFieldSpec column with Days Since Epoch value as a Date column based on Pinot Schematrue
pinot.inferTimestampTypeInSchemaInfer a Pinot TimeFieldSpec/DateTimeFieldSpec column with MilliSecond Since Epoch value as a Timestamp column based on Pinot Schematrue
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
coordinator.nameName of Presto Coordinatorcoordinator
coordinator.portPresto Coordinator port8080
coordinator.replicaCountPresto Coordinator replicas1
coordinator.query.maxMemoryMax Memory Usage per Query4GB
coordinator.query.maxMemoryPerNodeMax Memory Usage per Node per Query1GB
coordinator.query.maxTotalMemoryPerNodeMax Total Memory Usage per Node2GB
coordinator.discovery.serverEnabledEnable Discovery Servertrue
coordinator.discovery.uriDiscovery Server URIhttp://presto-coordinator:8080
coordinator.jvmCoordinator JVM Configs-server -Xmx16G -XX:+UseG1GC -XX:G1HeapRegionSize=32M -XX:+UseGCOverheadLimit -XX:+ExplicitGCInvokesConcurrent -XX:+HeapDumpOnOutOfMemoryError -XX:+ExitOnOutOfMemoryError
coordinator.logLog File Contentcom.facebook.presto=INFO
coordinator.node.environmentNode Environmentproduction
coordinator.node.idNode ID (Default is empty, Presto will assign automatically)``
coordinator.node.dataDirData Directory/home/presto/data
coordinator.node.schedulerIncludeCoordinatorIf Schedule Query on Coordinatortrue
coordinator.persistence.enabledUse a PVC to persist Presto Coordinator Datatrue
coordinator.persistence.accessModeAccess mode of data volumeReadWriteOnce
coordinator.persistence.sizeSize of data volume4G
coordinator.persistence.storageClassStorage class of backing PVC""
coordinator.service.portService Port8080
coordinator.external.enabledIf True, exposes Presto Coordinator externallytrue
coordinator.external.typeService TypeLoadBalancer
coordinator.external.portService Port8080
coordinator.resourcesPresto Coordinator resource requests and limits{}
coordinator.nodeSelectorNode labels for controller pod assignment{}
coordinator.affinityDefines affinities and anti-affinities for pods as defined in: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity preferences{}
coordinator.tolerationsList of node tolerations for the pods. https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/[]
coordinator.podAnnotationsAnnotations to be added to controller pod{}
coordinator.updateStrategy.typeStatefulSet update strategy to use.RollingUpdate
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
worker.nameName of Presto Workerworker
worker.portPresto Worker port8080
worker.replicaCountPresto Worker replicas1
worker.query.maxMemoryMax Memory Usage per Query8GB
worker.query.maxMemoryPerNodeMax Memory Usage per Node per Query4GB
worker.query.maxTotalMemoryPerNodeMax Total Memory Usage per Node8GB
worker.discovery.uriDiscovery Server URIhttp://presto-coordinator:8080
worker.jvmWorker JVM Configs-server -Xmx64G -XX:+UseG1GC -XX:G1HeapRegionSize=32M -XX:+UseGCOverheadLimit -XX:+ExplicitGCInvokesConcurrent -XX:+HeapDumpOnOutOfMemoryError -XX:+ExitOnOutOfMemoryError
worker.logLog File Contentcom.facebook.presto=INFO
worker.node.environmentNode Environmentproduction
worker.node.idNode ID (Default is empty, Presto will assign automatically)``
worker.node.dataDirData Directory/home/presto/data
worker.persistence.enabledUse a PVC to persist Presto Worker Datatrue
worker.persistence.accessModeAccess mode of data volumeReadWriteOnce
worker.persistence.sizeSize of data volume4G
worker.persistence.storageClassStorage class of backing PVC""
worker.service.portService Port8080
worker.resourcesPresto Worker resource requests and limits{}
worker.nodeSelectorNode labels for controller pod assignment{}
worker.affinityDefines affinities and anti-affinities for pods as defined in: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity preferences{}
worker.tolerationsList of node tolerations for the pods. https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/[]
worker.podAnnotationsAnnotations to be added to controller pod{}
worker.updateStrategy.typeStatefulSet update strategy to use.RollingUpdate
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Specify parameters using --set key=value[,key=value] argument to helm install

Alternatively a YAML file that specifies the values for the parameters can be provided like this:

helm install --name presto -f values.yaml .