Configure ODP Trino
This page helps you enable Trino JMX and configure the Pulse event listener so Pulse can collect metrics and display Trino query statistics.
- Pulse hook JARs are included in the installation package.
- To enable query statistics in Pulse, configure the Trino event listener.
- Trino’s event listener framework allows custom plugins to respond to query lifecycle events for advanced logging, debugging, and performance monitoring.
- The supported events are query creation and query completion.
- Each event provides session details, execution metrics, resource usage, and timelines.
Info
Trino versions 472 and 435 support the hook jar.
Enable Trino JMX
In the Ambari UI:
- Navigate to Trino > Configs > Advanced config-properties.
- In Coordinator Node Config and Worker Node Config, add the following parameters at the end of the file:
jmx.rmiregistry.port=9980
jmx.rmiserver.port=9981
Place Trino Hook JAR
- In the Trino node, navigate to the Trino plugin folder.
In the folder:
/usr/odp/current/trino/plugin/
- Create the event listener directory.
Create the following directory:
ad-trino-event-listener/
- Place the Trino Hook JAR in the directory.
Hook JAR:
ad-trino-event-listener-1.0.jar.
In the directory:
ad-trino-event-listener/
- Create the event-listener.properties file.
If not already present, create the file in the directory:
/usr/odp/current/trino/conf/
- Add the following properties.
In the event-listener.properties file, add the properties:
event-listener.name=ad-trino-event-listener
ad.cluster=<your-cluster-name>
ad.events.streaming.servers=<Pulse-IP>:19009
Replace <your-cluster-name> and <Pulse-IP> with actual values from your environment.
- Configure the plugin directory path.
If not already set, add the following line:
plugin.dir=/usr/odp/current/trino/plugin
To the node.properties file:
/usr/odp/current/trino/conf/node.properties
- Restart the Trino coordinator server.
All configurations must be applied to the Trino coordinator server.
Result
- Trino exposes JMX metrics on the configured port.
- Trino hook emits execution events to Pulse.
