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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.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 指南