为cassandra配置apache drill

bfnvny8b  于 2021-06-13  发布在  Cassandra
关注(0)|答案(2)|浏览(388)

我正在尝试用drill配置cassandra。我使用了链接上给出的相同方法:https://drill.apache.org/docs/starting-the-web-ui/.
我为新的存储插件使用了以下代码:

{
  "type": "cassandra",
  "hosts": [
    "127.0.0.1"
  ],
  "port": 9042,
  "username": "<username>",
  "password": "<password>",
  "enabled": false
}

我在这里附上了截图。
但我得到了以下错误:

Please retry: Error (invalid JSON mapping)

我如何解决这个问题?

wz1wpwve

wz1wpwve1#

我也会在这里更新一下。我们正在对drill如何使用存储插件进行一些认真的重构。具体来说,我们正在为cassandra整合方解石适配器1。这是因为存储插件最难的部分不是连接,而是优化。方解石已经为drill做了查询规划,并且已经实现了一堆这些适配器,这意味着找出所有优化(aka pushdown)的工作已经基本完成。
在Cassandra/锡拉的情况下,这一点尤为重要,因为有些过滤器应该向下推到Cassandra,有些过滤器绝对不应该向下推。适配器还包括聚合下推(aggregate pushdown)——这是目前没有drill插件能做到的。再次强调的是,一旦我们完成了这个任务,连接器应该能够很好地与cassandra/scylla一起工作。我们有一个用于elasticsearch的插件即将完成,一旦完成,cassandra插件就是下一个。如果您有任何建议/意见或其他反馈,请在上面链接的请求上发布。

lokaqttq

lokaqttq2#

所有代码:
Git:https://github.com/yssharma/drill/tree/cassandra-storage
补丁:https://gist.github.com/yssharma/2581ae8a97c559b2677f
1获取钻取:获取钻取源

$ git clone https://github.com/apache/drill.git

2获取cassandra存储修补程序/从以下位置下载修补程序文件:

https://reviews.apache.org/r/29816/diff/raw/

三。在drill$cd drill$git apply上面应用补丁——选中~/downloads/drill-92-cassandrastorage.patch$git apply~/downloads/drill-92-cassandrastorage.patch
4使用cassandra存储和导出分发到/opt/drill构建演练

$ mvn clean install -DskipTests
$ mkdir /opt/drill
$ tar xvzf distribution/target/*.tar.gz --strip=1 -C /opt/drill

5启动sqlline。我们已经完成了drill的构建和安装,是时候开始使用drill了。

$ cd /opt/drill
$ bin/sqlline -u jdbc:drill:zk=local -n admin -p admin
Drill-Sqlline

点击“显示模式”查看现有模式。
钻取sqlline架构
6钻取web界面您应该能够在上看到钻取web界面localhost:8047,或者不管您的主机/端口是什么。
将此用作配置:

{
      "type": "cassandra",
      "config": {
        "cassandra.hosts": [
          "127.0.0.1",
          "127.0.0.2"
        ],
        "cassandra.port": 9042
      },
      "enabled": true
    }

另外,如果这不起作用,要知道他们现在正在为它开发一个插件: https://github.com/apache/drill/pull/1960

相关问题