zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    Oracle与MySQL的转化差异
    iOS 创建静态库文件时去掉当中的Symbols
    hdu4336 Card Collector 状态压缩dp
    随机森林——Random Forests
    OpenCV码源笔记——Decision Tree决策树
    海明距离hamming distance
    学习OpenCV——Surf简化版
    学习OpenCV——用OpenCv画漫画
    学习OpenCV——ORB简化版&Location加速版
    学习OpenCV——hand tracking手势跟踪
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/13775559.html
Copyright © 2011-2022 走看看