Presto教程

Presto JMX 连接器

Java 管理扩展 (JMX) 提供有关 Java 虚拟机和在 JVM 中运行的软件的信息。 JMX 连接器用于在 Presto 服务器中查询 JMX 信息。
因为我们已经在 "etc/catalog" 目录下启用了 "jmx.properties" 文件。现在连接 Perst CLI 以启用 JMX 插件。

Presto CLI

查询

$ ./presto--server localhost:8080--catalog jmx--schema jmx 

结果

您将收到以下回复。
presto:jmx> 

JMX 架构

要列出"jmx"中的所有模式,请键入以下查询。

查询

presto:jmx> show schemas from jmx; 

结果

      Schema 
--------------------
 information_schema  
 current

显示表格

要查看"当前"模式中的表,请使用以下命令。

查询 1

presto:jmx> show tables from jmx.current; 

结果

                                    Table                   
------------------------------------------------------------------------------
 com.facebook.presto.execution.scheduler:name = nodescheduler
 com.facebook.presto.execution:name = queryexecution
 com.facebook.presto.execution:name = querymanager
 com.facebook.presto.execution:name = remotetaskfactory
 com.facebook.presto.execution:name = taskexecutor
 com.facebook.presto.execution:name = taskmanager
 com.facebook.presto.execution:type = queryqueue,name = global,expansion = global
 ………………
 ……………….

查询 2

presto:jmx> select * from jmx.current.”java.lang:type = compilation"; 

结果

node               | compilationtimemonitoringsupported |      name   |         objectname         | totalcompilationti
--------------------------------------+------------------------------------+--------------------------------+----------------------------+-------------------
ffffffff-ffff-ffff-ffff-ffffffffffff | true | HotSpot 64-Bit Tiered Compilers | java.lang:type=Compilation |       1276

查询 3

presto:jmx> select * from jmx.current."com.facebook.presto.server:name = taskresource";

结果

 node                 | readfromoutputbuffertime.alltime.count 
 | readfromoutputbuffertime.alltime.max | readfromoutputbuffertime.alltime.maxer
--------------------------------------+---------------------------------------+--------------------------------------+---------------------------------------
 ffffffff-ffff-ffff-ffff-ffffffffffff |                                   92.0 |                          1.009106149 | 
昵称: 邮箱:
Copyright © 2022 立地货 All Rights Reserved.
备案号:京ICP备14037608号-4