dremio 社区flight 格式化扩展说明

实际上代码来自一个老项目,现在dremio 的变动还是很大的,项目是运行不起来的,但是还是很值得学习参考的

开发说明

formation 是基于dremio 3.0 版本,特别老的,,此版本对于reader 以及writer的处理还是很复杂的,代码量很大,
详细的可以参考代码,开发机制相对有点复杂,新版本的,处理上更加灵活,而且代码处理上
更加清晰,测试部分很是值得学习的(我以前也简单介绍过)

  • 单元测试部分
    我们扩展BaseTestQuery 就可以方便的实现测试了
 
public class TestFormation extends BaseTestQuery {
 
  @Test
  public void test1() throws Exception {
    SourceConfig c = new SourceConfig();
    FormationConfig conf = new FormationConfig();
    c.setConnectionConf(conf);
    c.setName("flight");
    c.setMetadataPolicy(CatalogService.NEVER_REFRESH_POLICY);
    CatalogServiceImpl cserv = (CatalogServiceImpl) getBindingProvider().lookup(CatalogService.class);
    cserv.createSourceIfMissingWithThrow(c);
    test("create table flight.blue as select * from sys.options");
//    test("create table flight.lineitem as select * from dfs_root.opt.data.sf1p.lineitem");
//    test("select count(*) from flight.lineitem");
    test("select * from flight.blue");
    test("select * from flight.blue");
  }
}

新版本存储扩展依赖

通过下图可以看到新版本flight 扩展的处理

 

 

说明

因为dremio 12 之后flight 就放到core 中了,所以早期的设计很多会不太一样了,而且新版本代码设计更加灵活简单(尤其扩展的arp机制还有抽象接口提升不少)

参考资料

https://github.com/jacques-n/formation

posted on   荣锋亮  阅读(42)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2021-03-02 sijms/go-ora 1.0 发布了,使用buffer提升了系统的性能
2020-03-02 pg pg_stat_statements 扩展使用
2019-03-02 pghoard 面向云存储的pg 备份&&恢复工具
2019-03-02 pgbench 安装试用

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示