Skip to content

Presto Endpoint

Okera offers many different ways to access managed datasets. One of those options is the Presto Endpoint, which is powered by an embedded PrestoDB instance that is collocated on ODAS clusters.

The following sections explain how to access the Presto endpoint information and provide example client integrations.

Endpoint Information

The System page provides the necessary information about the Presto endpoint. The two important values provided are:

  • Presto endpoint

    The embedded Presto cluster is listening to web requests at the specified HTTP(S) URL. It can be used for custom client integrations and to access the Presto WebUI. See Command-line Tools for another way to determine the Presto endpoint information.

    Note: Okera's Presto endpoint does not support HTTP/2 connections and blocks them. It supports HTTP/1.1 connections only. Some third-party tools bundle JDK into their product. In JDK 11.0 or higher, the HTTP protocol defaults to HTTP/2, rather than HTTP/1.1. So if your third-party tool installs JDK 11.0 or higher, you may see some performance problems. To resolve this conflict, you can block the HTTP/2 protocol at the load balancer, configure the Presto client to use HTTP/1.1, or configure the Presto client to use a lower version of JDK rather than the bundled version.

  • JDBC url

    This info field contains the fully-specified JDBC database connection URL. It can be used for client integrations that require JDBC details.

    The URL is constructed like so:

    jdbc:presto://<presto-coord-fqdn>:<presto-coord-port>/<catalog-name>
    
    Note that the <catalog-name> varies for versions of ODAS: okera is used for version 2.x and newer, while recordservice is used for all 1.x versions of ODAS.

With the information provided in the ODAS WebUI, you can proceed to the client integration example, or keep reading the next sections for more detailed information.

Command-Line Tools

Alternatively, you can use the okctl command-line tool to get the Presto endpoint details like so:

$ ./okctl endpoints
...
2020/03/19 10:48:22 presto-coordinator:api (type: NodePort)
2020/03/19 10:48:22   10.1.10.4:14050

Using the command-line tool may return the IP address instead of a DNS FQDN. Talk to your administrators to get the proper DNS entry or IP address to access the Presto endpoint. For instance, the cluster could be configured with an FQDN (as shown in the earlier screenshot) using specific cluster configuration keys:

$ ./okctl export-config 2>&1 | grep -i presto
  OKERA_EXTERNAL_PRESTO_HOST: odas.it-infra.corp.internal
  OKERA_EXTERNAL_PRESTO_PORT: "14050"
  PRESTO_API: 14050

Using this information developers could automated the way the Presto endpoint is determined, and use that in scripts to communicate with Presto, or set the endpoint and/or JDBC URL as values for generated client access configuration files.

Presto WebUI

Since Presto provides its own web-based UI, you can use the provided web URL to access the coordinator interface using a web browser.

In this example https://odas.it-infra.corp.internal:14050 is the URL for the Presto UI and can be copied to the clipboard using the icon next to the Presto endpoint heading:

Copy Endpoint To Clipboard

Before you can access the UI, you need to authenticate with a username and password from your configured corporate directory (for example, MS Active Directory):

WebUI Login

If you have authenticated successfully, you are presented with the Presto WebUI, providing details about the Presto cluster itself as well as the currently and recently executed queries:

Presto Coordinator UI

The UI is mostly informational, but could be used to debug query issues. Since it requires a certain amount of knowledge and Presto training, the UI is usually only accessible to Database Administrators or other administrative staff members.

Client Integration

Read onto the next section Integrating Okera with BI tools to see docs on how to connect to Okera's Presto endpoint via popular SQL clients.