clickhouse - clickhouse外部字典加载错误
问题描述
我计划升级 clickhouse 集群。从 v19.14.6 开始。到 v21.3.10。但是当我在 v21.3.10 上加载 mysql 外部字典时,出现错误:
Query:
SYSTEM RELOAD DICTIONARY dim_subject_movie
Received exception from server:
Poco::Exception. Code: 1000, e.code() = 0, e.displayText() = Exception: Connections to all replicas failed: frodo@mysql1:3306 as user test, frodo@mysql1:3306 as user test (version 21.3.10.1 (official build))
配置如下
<dictionary>
<name>dim_subject_movie</name>
<source>
<mysql>
<port>3306</port>
<user>test</user>
<password>test1</password>
<replica>
<host>mysql1</host>
<priority>1</priority>
</replica>
<db>frodo</db>
<table>subject_movie_collection</table>
<where>date=subdate(current_date, 1)</where>
</mysql>
</source>
<lifetime>
<min>300</min>
<max>360</max>
</lifetime>
<layout><hashed /></layout>
<structure>
<id>
<name>movie_id</name>
</id>
<attribute>
<name>movie_title</name>
<type>String</type>
<null_value></null_value>
</attribute>
</structure>
</dictionary>
有人遇到过同样的问题吗?谢谢!</p>
解决方案
找到原因是因为 dic 源码(mysql 5.1)太旧,无法兼容高版本的clickhouse。最后我把clickhouse的版本改回19.14.6。
推荐阅读
- list - 列表视图使用 Flutter 中的属性过滤掉最后一行数据
- java - Project a boolean value with Spring from MongoDB depending on field existence
- javascript - react + Material ui makeStyles with '!important'
- javascript - Jquery:以编程方式触发大型下拉菜单上的点击事件
- javascript - 检查变量是否是函数的最佳方法是什么?
- vagrant - 将 MacOS 更新到 Catalina 后,无法从 vagrant box 访问共享文件夹(过时的文件句柄)
- javascript - 如何在 react-router v5 中通过 history.push 传递对象?
- python - Django Admin 使用 save_model() 在更改(或保存)时加密某些字段的值
- php - PHP MySQL中的分页不限制数据,也不转到下一页
- f# - 如何从 F# 创建 DynamoDB 条目?