Presto (also known as PrestoDB) is a distributed SQL query engine built for interactive analytics at scale. This topic covers its key features, architecture, data model, and the benefits of running it on E-MapReduce (EMR).
Important notes
E-MapReduce (EMR) versions 3.45.0 and 5.11.0 or later support Presto, which typically has a version number of 0.2XX. In earlier EMR versions, the Presto component with a version number of 3XX used the PrestoSQL or Trino kernel. For more information, see Trino.
Key features
Presto is written in Java and designed for high performance and horizontal scalability. It provides:
Full ANSI SQL support.
Connectivity to a wide range of data sources, including Hive, Hudi, Iceberg, Delta Lake, MySQL, and PostgreSQL.
-
Support for advanced data types:
Arrays and maps
JSON data
Geographic Information System (GIS) data
Color data
-
Extensibility through multiple mechanisms:
Pluggable data connectors
Custom data types
Custom SQL functions
Pipeline processing: returns query results to clients incrementally as data is processed, reducing time to first result.
-
Built-in observability:
A web UI for visualizing query execution in real time.
JMX protocol support for metrics collection.
Architecture
The following figure shows the Presto system architecture.
Presto uses a coordinator/worker architecture. One coordinator node manages query planning and cluster state; multiple worker nodes handle distributed query execution.
The coordinator is responsible for:
Accepting and parsing queries, generating execution plans, and distributing plan fragments to worker nodes.
Monitoring worker node health. Each worker maintains a heartbeat connection with the coordinator to report its status.
Maintaining metastore metadata.
Worker nodes execute distributed query tasks. They use connectors to read and process data from external storage systems, then return results to the coordinator.
Presto does not currently support a high availability (HA) architecture. In an EMR cluster, the coordinator runs on the master-1-1 node. Workers run on all Core and Task nodes.
Use cases
Presto is optimized for analytical workloads on large datasets. It works well for:
Extract, transform, and load (ETL)
Ad hoc queries
Large-scale analysis of structured or semi-structured data
Multidimensional data aggregation and report generation
Presto is a data warehouse engine. Its transaction support is limited, so it is not suitable for online transactional processing (OLTP) workloads.
Benefits of Presto on EMR
Compared to self-managed open source Presto, Presto on EMR provides:
Quick setup: spin up a Presto cluster with hundreds of nodes in minutes.
Elastic scaling with minimal configuration.
Native integration with the EMR software stack, including Data Lake Formation (DLF), Object Storage Service (OSS), and OSS-HDFS.
Fully managed operations: EMR handles cluster provisioning and O&M so you can focus on queries.
Concepts
Data model
Presto organizes data in a three-layer hierarchy: catalog, schema, and table.
Catalog: contains one or more schemas and maps to an external data source that a connector can access. A single query can span multiple catalogs.
Schema: equivalent to a database instance; contains one or more tables.
Table: a standard relational table within a schema.
Connector
Connectors are the integration layer between Presto and external data sources. Presto ships with built-in connectors for common systems and exposes a standard SPI that you can implement to connect custom data sources.
Typically, each catalog is bound to a specific connector type, defined in the catalog's properties file.
More information
To view the open source Presto documentation for your version, replace XXX in the URL https://prestodb.io/docs/XXX/ with your Presto component version number, then open the URL in a browser.
For example, if your Presto version is 0.279, the documentation is at https://prestodb.io/docs/0.279/.