Chapter 2. Getting Started with Presto

There are various ways to set up Presto. In the first part of this chapter, you’ll see how to install Presto manually. We won’t dwell much on manual installation, because the real goal of the chapter is to build a small cluster locally, which simulates a realistic production environment.

Next, you’ll see how to install Presto on Docker and how to set up a local cluster in Kubernetes. Finally, you’ll learn how to run your first queries in Presto, with a focus on how to list catalogs and schemas, and query a table.

This chapter assumes that you have some familiarity with Docker, Kubernetes, and using a command line. Even if you don’t, you should still be able to follow the instructions end to end and get a working deployment running successfully.

Presto Manual Installation

To set up Presto on your local machine, you can follow the procedure described in the Presto official documentation. Since Presto is written in Java, you should pay attention to the specific versions of Java supported by Presto. Presto requires Java 8. Both Oracle JDK and OpenJDK are supported.

Running Presto on Docker

The local Presto instance is great for development and troubleshooting. You can set up a full production cluster with multiple nodes using bare-metal machines or VMs. However, you would need to manage the monitoring, availability, scalability, and rollout of these nodes by yourself. This is where containers and Kubernetes come in.

In this section, we’ll ...

Get Learning and Operating Presto now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.