drill http 存储插件试用

以下是对于http 存储插件的试用

环境准备

  • docker 启动drill (1.18.0 )
docker run -i --name drill-1.18.0 -p 8047:8047 -p 31010:31010 -p 31011:31011 -p 31012:31012 -t apache/drill:1.18.0 /bin/bash

配置http 存储插件

  • 参考格式
{
  "type": "http",
  "cacheResults": true,
  "connections": {},
  "timeout": 0,
  "proxyHost": null,
  "proxyPort": 0,
  "proxyType": null,
  "proxyUsername": null,
  "proxyPassword": null,
  "enabled": true
}
  • 说明
    上边的connections 是核心,配置如下:
    URL : 指定需要访问的url信息, 可以指定的配置requireTail,params
    requireTai,进行url的拼接处理 ,默认false
    比如:
 
url: "https://api.sunrise-sunset.org/json?lat=36.7201600&lng=-4.4203400&date=2019-10-02",
requireTail: false

sql 查询:

SELECT * FROM api.sunrise;

为true的模式

url: "https://api.sunrise-sunset.org/json",
requireTail: true

sql 查询:

SELECT * FROM api.sunrise.`?lat=36.7201600&lng=-4.4203400&date=2019-10-02`

params 指定:
参考:

 
url: "https://api.sunrise-sunset.org/json",
requireTail: false,
params: ["lat", "lng", "date"]

sql 查询:

SELECT * FROM api.sunrise
WHERE `lat` = 36.7201600 AND `lng` = -4.4203400 AND `date` = '2019-10-02'

Method: 指定http请求的verb
包含了method:post,get postBody: 指定请求提内容
Headers: 指定http 请求头信息
Authorization: 指定http 请求的授权模式,目前暂时只支持basic 认证默认,后期会有其他模式的支持
其他相关配置:http proxy 配置,具体可以参考以下的连接

简单使用

  • 配置存储插件

 

 

  • 数据查询

 

 


效果

 

 

说明

drill 的http 存储扩展还是很不错的功能,基于次我们也可以用来分析prometheus 的metrics (基于http api),以及其他基于http的请求

参考资料

https://github.com/apache/drill/tree/master/contrib/storage-http

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

编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2019-10-06 AsyncAPI 试用
2019-10-06 AsyncAPI and CloudEvents
2019-10-06 asyncapi 指南

导航

< 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
点击右上角即可分享
微信分享提示