Trino Installation on VM with OpenLineage

This guide explains how to install Trino on a Linux virtual machine and configure OpenLineage integration for capturing query lineage events.

The document covers:

  • System preparation

  • Trino installation

  • Trino configuration

  • OpenLineage plugin setup

  • Starting and validating Trino

  • Installing the Trino CLI

Running Trino as a system service.

1. System Preparation

Before installing Trino, update the system and install the required dependencies.

Update the System

Bash
Copy

Install Java (Required for Trino)

Bash
Copy

Install Additional Utilities

Bash
Copy

2. Install Trino

Create the installation directory

Bash
Copy

Download the Trino server package

Bash
Copy

Extract and organize the installation

Bash
Copy

Create required directories

Bash
Copy

3. Configure Trino

Trino requires several configuration files located under:

Copy

Create node.properties

This file defines node identity and data directory.

Bash
Copy

Create jvm.config

Configure JVM memory settings and adjust the -Xmx value according to your VM memory.

Example for an 8GB memory allocation:

Bash
Copy

Create config.properties

Defines Trino server behavior.

Bash
Copy

Configure Logging

Bash
Copy

Configure a Test Catalog (TPC-H)

This creates a sample catalog for testing queries.

Bash
Copy

4. Install the OpenLineage Plugin

The OpenLineage plugin allows Trino to send lineage events to external systems.

Bash
Copy

Create a directory for the OpenLineage plugin

Bash
Copy

Download the Plugin

Bash
Copy

Verify the Installation

Bash
Copy

Expected Output: openlineage-trino-1.23.0.jar

5. Configure OpenLineage Event Listener

Create the event listener configuration file.

Bash
Copy

Replace the following placeholders with your environment values:

Place HolderDescription
<YOUR_TRINO_HOST>Hostname or IP of the Trino server
<TENANT_NAME>Acceldata tenant name
<YOUR_ACCESS_KEY>Acceldata access key
<YOUR_SECRET_KEY>Acceldata secret key

6. Set Directory Ownership

Ensure the correct user owns the directories.

Bash
Copy

7. Start Trino

Navigate to the Trino installation

Bash
Copy

Start the server

Bash
Copy

Check the server status

Bash
Copy

Wait for the server to initialize.

Bash
Copy

8. Verify OpenLineage Initialization

Check logs to confirm the OpenLineage listener is registered.

Bash
Copy

Expected log message:

Copy

9. Verify Trino is Running

Bash
Copy

If successful, the output should show port 8080 listening.

10. Install Trino CLI

The CLI allows you to run queries from the command line.

Download the CLI

Bash
Copy

Install the CLI

Bash
Copy

Verify installation

Bash
Copy

11. Connect to Trino

Run the following command to connect to the server.

Bash
Copy

You can now run SQL queries.

Example:

SQL
Copy

Running Trino as a system service ensures it automatically starts after system reboot.

Create a Trino Service User

Bash
Copy

Assign Ownership

Bash
Copy

Stop the Manually Running Instance

Bash
Copy

Create the systemd Service File

Bash
Copy

Enable and Start the Service

Reload systemd:

Bash
Copy

Enable Trino at boot:

Bash
Copy

Start the service:

Bash
Copy

Verify Service Status

Bash
Copy

Installation Complete

You have successfully:

  • Installed Trino
  • Configured TPC-H test catalog
  • Integrated OpenLineage
  • Installed the Trino CLI
  • Configured Trino as a system service

Trino is now ready for running queries and emitting lineage events to your configured OpenLineage endpoint.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard