0
点赞
收藏
分享

微信扫一扫

dremio 查看外部profile 信息

五殳师兄 2022-12-17 阅读 53

dremio web server 基于了jersey实际包含了比较完备的配置支持(类似spring boot 强大的配置支持一样)
同时dremio 也包含了一些测试api 但是默认是关闭的,我们可以通过配置,或者修改代码打开,目前我基于
代码进行了修改

参考修改的代码

  • TestResourcesFeature.java

 

public boolean configure(FeatureContext context) {

Configuration configuration = context.getConfiguration();

// Boolean enabled = PropertyHelper.getProperty(configuration, RestServerV2.TEST_API_ENABLE);

Boolean enabled = true;

 

// Default is not enabled

if (enabled == null || !enabled) {

return false;

}

 

for (Class<?> resource : scanResult.getAnnotatedClasses(RestResourceUsedForTesting.class)) {

context.register(resource);

}

 

return true;

}

构建

  • 参考构建

mvn clean  package  -Dmaven.test.skip // 如果外部的已经构建了,可以直接构建dac 的backend 就行了

使用效果

  • 使用
    直接替换jar 包就行了
  • 访问

 

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

  • 效果

通过粘贴查询profile 的json 格式到表单就行了

dremio 查看外部profile 信息_java

 

 

dremio 查看外部profile 信息_github_02

 

 

说明

如果同时进行关注dremio 社区,实际上官方团队就经常要用户一些profile 信息,方便分析问题,处理上应该是类似的,只是关于估计包装了自己的系统,开启了test api
的dremio 对于我们平时分析一些查询问题还是很有用的,同时也可以学习一些社区的profile信息,dremio 23 开始的版本我已经提交到github了,可以直接使用

参考资料

​​https://docs.dremio.com/software/jobs/viewing-query-profiles/​​​
​​​https://docs.dremio.com/software/jobs/raw-profile/​​​
​​​https://github.com/rongfengliang/mydremio-packages-private​​

举报

相关推荐

0 条评论