dremio 测试特性api 的开启&外部profile查看

以前简单说过基于代码修改开启test 的外部profile 能力,实际上官方是由配置参数的,可以在启动的时候添加到配置中

配置添加

  • dremio.conf 文件
debug {
  allowTestApis: true
}

检查选项时候开启的一个技巧

使用arthas

  • 命令
    使用了arthas的vmtool也可以结合ongl 一起使用,如下
 
vmtool --action getInstances --className com.dremio.dac.server.DACConfig  --express 'instances[0].allowTestApis' 

效果(如果如下可以确保选项是开启的)

访问地址

http://<hostip>:9047/apiv2/test/render_external_profile

效果

测试效果

  • 一个测试profile

说明

以前没仔细看源码,直接通过修改源码,实际是可以通过配置解决的,同时结合arthas进行分析是一个很不错的方式,可以进行排错

参考资料

https://www.cnblogs.com/rongfengliang/p/16975707.html
https://arthas.aliyun.com/doc/vmtool.html#%E8%8E%B7%E5%8F%96%E5%AF%B9%E8%B1%A1
https://arthas.aliyun.com/doc/ognl.html

posted on 2024-01-16 15:27  荣锋亮  阅读(11)  评论(0编辑  收藏  举报

导航