All Products
Search
Document Center

E-MapReduce:JMX connector

Last Updated:Mar 26, 2026

The Java Management Extensions (JMX) connector lets you query JMX metrics from all nodes in a Trino cluster using standard SQL. Configure it to dump metrics on a schedule for ongoing system monitoring and debugging.

Prerequisites

Before you begin, ensure that you have:

  • A DataLake cluster or Hadoop cluster with the Presto service selected. See Create a cluster.

Configure the JMX connector

Log on to the E-MapReduce (EMR) console and go to the Configure tab of the Trino service page. Click jmx.properties, then add or modify the following configuration items.

Minimal configuration — enables the connector with default settings:

connector.name=jmx

Full configuration — enables periodic metric dumps:

connector.name=jmx
jmx.dump-tables=io.trino.memory:type=memorypool\\\\,name=general,\
  io.trino.memory:type=memorypool\\\\,name=system,\
  io.trino.memory:type=memorypool\\\\,name=reserved
jmx.dump-period=10
jmx.max-entries=86400
Configuration itemDefaultDescription
connector.namejmxName of the connector
jmx.dump-tablesManaged Beans (MBeans) to sample and store in memory during each sampling period. Separate multiple MBeans with commas (,).
jmx.dump-period10Sampling period. Unit: seconds
jmx.max-entries86400Maximum number of history records

Escaping commas in MBean names

If an MBean name contains a comma, escape it with a double backslash (\\). A single backslash (\) is reserved for splitting a long value across multiple lines, so you need \\ to represent a literal comma within a name:

jmx.dump-tables=io.trino.memory:type=memorypool\\\\,name=general,\
  io.trino.memory:type=memorypool\\\\,name=system,\
  io.trino.memory:type=memorypool\\\\,name=reserved

Query JMX data

The JMX connector provides two schemas: current and history.

current schema

The current schema contains one table per MBean, reflecting the live state of every node in the Trino cluster. The table name is the MBean name. If an MBean name contains non-standard characters, enclose it in double quotation marks in queries.

List all available MBeans:

SHOW TABLES FROM jmx.current;

Get Java Virtual Machine (JVM) information for each node:

SELECT node, vmname, vmversion
FROM jmx.current."java.lang:type=runtime";

Expected output:

      node    |              vmname               | vmversion
--------------+-----------------------------------+-----------
 ddc4df17-xxx | Java HotSpot(TM) 64-Bit Server VM | 24.60-b09
(1 row)

Get file descriptor metrics for each node:

SELECT openfiledescriptorcount, maxfiledescriptorcount
FROM jmx.current."java.lang:type=operatingsystem";

Expected output:

openfiledescriptorcount | maxfiledescriptorcount
-------------------------+------------------------
                     329 |                  10240
(1 row)

history schema

The history schema stores time-series snapshots of the MBeans configured in jmx.dump-tables. Each snapshot is recorded once per sampling period.

SELECT "timestamp", "uptime" FROM jmx.history."java.lang:type=runtime";

Expected output:

        timestamp        | uptime
-------------------------+--------
 2016-01-28 10:18:50.000 |  11420
 2016-01-28 10:19:00.000 |  21422
 2016-01-28 10:19:10.000 |  31412
(3 rows)