zoukankan      html  css  js  c++  java
  • drill 学习 十 drill rest api

    drill 提供了web ui 以及rest api 我们基于rest api 可以开发相关的业务系统(不需要依赖jdbc 驱动)
    以下是简单梳理rest api 的使用(关于暴露的系统ui api 没有说明)

    查询

    api 地址:POST /query.json
    请求提内容

     
    {
          "queryType" : "SQL",
          "query" : "<Drill query>",
          "autoLimit" : "<rows returned>"
    }

    profile

    • profile 信息查看
      api 地址:GET /profiles.json
    • 获取指定查询的信息
      api 地址: GET /profiles/{queryid}.json
    • 取消指定查询
      api 地址: GET /profiles/cancel/{queryid}

    存储插件

    • 获取存储配置列表
      api 地址: GET /storage.json
    • 获取指定存储信息的配置
      api 地址: GET /storage/{name}.json
    • 启用禁用配置存储
      api 地址: GET /storage/{name}/enable/{val} val 为true,false
    • 创建存储配置
      api 地址: POST /storage/{name}.json
    • 删除存储配置
      api 地址: DELETE /storage/{name}.json

    metrics

    • 获取集群信息
      api 地址: GET /cluster.json
    • 获取drill 状态
      api 地址: /status
    • 获取当前内存信息
      api 地址: GET /status/
    • 线程信息获取
      api 地址: GET /status/threads
    • 系统配置信息获取
      api 地址: GET /options.json

    api 请求验证

    从1.18 开始支持的

    • basic 认证
      配置: drill-override.conf 文件
     
    http: {
        enabled: true,
        auth: {
            # Http Auth mechanisms to configure. If not provided but user.auth is enabled
            # then default value is ["FORM"].
            mechanisms: ["BASIC", "FORM"]
        }
    }
    • 表单认证
      配置: drill-override.conf 文件
     
    http: {
        enabled: true,
        auth: {
            # Http Auth mechanisms to configure. If not provided but user.auth is enabled
            # then default value is ["FORM"].
            mechanisms: ["BASIC", "FORM"]
        }
    } 

    参考资料

    https://drill.apache.org/docs/rest-api-introduction/

  • 相关阅读:
    排序算法(二)插入排序---直接插入排序
    Shazam 是如何听音辨曲的?
    Android 读取<meta-data>元素的数据
    Android <uses-featureandroid:name="string">详解
    Android AsyncTask的用法
    Android ViewPager使用详解
    Git 使用教程(4)—— Git 常用命令集合
    Git 使用教程(3)
    Git 使用教程(2)
    Git 使用教程
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/13773443.html
Copyright © 2011-2022 走看看