首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >检查是否在clickhouse-client中应用了设置。

检查是否在clickhouse-client中应用了设置。
EN

Stack Overflow用户
提问于 2021-07-15 21:43:56
回答 1查看 841关注 0票数 1

如何检查群集设置是否应用于服务器?

例如,我在集群上运行--query "SET allow_experimental_live_view = 1"。应该使用哪个查询来检查此设置是否已更改?是否可以使用clickhouse-client命令?

这个问题类似,但没有回答我的How to check whether Clickhouse server-settings is really applied?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-07-15 23:09:26

clickhouse-客户有很多选择。让我们检查一下:

代码语言:javascript
复制
clickhouse-client --help

...
  --allow_experimental_live_view arg                               Enable LIVE VIEW. Not mature enough.
  --live_view_heartbeat_interval arg                               The heartbeat interval in seconds to indicate live query is alive.
  --max_live_view_insert_blocks_before_refresh arg                 Limit maximum number of inserted blocks after which mergeable blocks are dropped and query is re-executed.
...

它需要这样通过:

代码语言:javascript
复制
clickhouse-client --allow_experimental_live_view 1

若要检查当前设置,请使用:

代码语言:javascript
复制
SELECT *
FROM system.settings
WHERE name LIKE '%_live_%'

┌─name───────────────────────────────────────┬─value─┬─changed─┬─description────────────────────────────────────────────────────────────────────────────────────────────────┬─min──┬─max──┬─readonly─┬─type────┐
│ tcp_keep_alive_timeout                     │ 0     │       0 │ The time in seconds the connection needs to remain idle before TCP starts sending keepalive probes         │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │        0 │ Seconds │
│ allow_experimental_live_view               │ 1     │       1 │ Enable LIVE VIEW. Not mature enough.                                                                       │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │        0 │ Bool    │
│ max_live_view_insert_blocks_before_refresh │ 64    │       0 │ Limit maximum number of inserted blocks after which mergeable blocks are dropped and query is re-executed. │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │        0 │ UInt64  │
│ temporary_live_view_timeout                │ 5     │       0 │ Timeout after which temporary live view is deleted.                                                        │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │        0 │ Seconds │
│ periodic_live_view_refresh                 │ 60    │       0 │ Interval after which periodically refreshed live view is forced to refresh.                                │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │        0 │ Seconds │
└────────────────────────────────────────────┴───────┴─────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────┴──────┴──────────┴─────────┘

要在所有集群节点上运行此查询,请参见is there a better way to query system tables across a clickhouse cluster?

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68401082

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档