You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2018/12/27 05:58:50 UTC

[kylin] branch document updated: KYLIN-3723 Can't find bad query configuration in kylin config doc

This is an automated email from the ASF dual-hosted git repository.

shaofengshi pushed a commit to branch document
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/document by this push:
     new eb97117  KYLIN-3723 Can't find bad query configuration in kylin config doc
eb97117 is described below

commit eb971178d839adbf258781d8e8a9ed6fbd24e8da
Author: GinaZhai <na...@kyligence.io>
AuthorDate: Thu Dec 27 13:19:11 2018 +0800

    KYLIN-3723 Can't find bad query configuration in kylin config doc
---
 website/_docs/install/configuration.cn.md | 13 +++++++++++++
 website/_docs/install/configuration.md    | 13 ++++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/website/_docs/install/configuration.cn.md b/website/_docs/install/configuration.cn.md
index ed47682..197b8d3 100644
--- a/website/_docs/install/configuration.cn.md
+++ b/website/_docs/install/configuration.cn.md
@@ -48,6 +48,7 @@ permalink: /cn/docs/install/configuration.html
     - [模糊查询](#fuzzy)
 	- [查询缓存](#cache-config)
 	- [查询限制](#query-limit)
+	- [坏查询](#bad-query)
 	- [查询下压](#query-pushdown)
 	- [查询改写](#convert-sql)
 	- [收集查询指标到 JMX](#jmx-metrics)
@@ -587,6 +588,18 @@ Kylin 可以使用三种类型的压缩,分别是 HBase 表压缩,Hive 输
 
 
 
+### 坏查询		{#bad-query}
+
+`kylin.query.timeout-seconds` 的值为大于 60 或为 0,`kylin.query.timeout-seconds-coefficient` 其最大值为 double 的上限。这两个参数的乘积为坏查询检查的间隔时间,如果为 0,那么会设为 60 秒,最长秒数是 int 的最大值。
+
+- `kylin.query.badquery-stacktrace-depth`:设置堆栈追踪的深度,默认值为 10
+- `kylin.query.badquery-history-number`:设置要展示的历史坏查询的数量,默认为 50
+- `kylin.query.badquery-alerting-seconds`:默认为 90,如果运行时间大于这个值,那么首先就会打出该查询的日志信息,包括(时长、项目、线程、用户、查询 id)。至于是否保存最近的查询,取决于另一个参数。然后记录 Stack 日志信息,记录的深度由另一个参数指定,方便后续问题分析
+- `kylin.query.badquery-persistent-enabled`:默认为 true,会保存最近的一些坏查询,而且不可在 Cube 级别进行覆盖
+
+
+
+
 ### 查询下压		{#query-pushdown}
 
 - `kylin.query.pushdown.runner-class-name=org.apache.kylin.query.adhoc.PushDownRunnerJdbcImpl`:如果需要启用查询下压,需要移除这句配置的注释
diff --git a/website/_docs/install/configuration.md b/website/_docs/install/configuration.md
index cad8b96..206a11d 100644
--- a/website/_docs/install/configuration.md
+++ b/website/_docs/install/configuration.md
@@ -47,6 +47,7 @@ permalink: /docs/install/configuration.html
     - [Fuzzy Query](#fuzzy)
 	- [Query Cache](#cache-config)
 	- [Query Limits](#query-limit)
+	- [Bad Query](#bad-query)
 	- [Query Pushdown](#query-pushdown)
 	- [Query rewriting](#convert-sql)
 	- [Collect Query Metrics to JMX](#jmx-metrics)
@@ -573,7 +574,7 @@ This section introduces Kylin query related configuration.
 
 ### Query Limits {#query-limit}
 
-- `kylin.query.timeout-seconds`: specifies the query timeout in seconds. The default value is 0, that is, no timeout limit on query. If the value is less than 60, it will set to seconds.
+- `kylin.query.timeout-seconds`: specifies the query timeout in seconds. The default value is 0, that is, no timeout limit on query. If the value is less than 60, it will set to 60 seconds.
 - `kylin.query.timeout-seconds-coefficient`: specifies the coefficient of the query timeout seconds. The default value is 0.5.
 - `kylin.query.max-scan-bytes`: specifies the maximum bytes scanned by the query. The default value is 0, that is, there is no limit.
 - `kylin.storage.partition.max-scan-bytes`: specifies the maximum number of bytes for the query scan. The default value is 3221225472 (bytes), which is 3GB.
@@ -581,6 +582,16 @@ This section introduces Kylin query related configuration.
 
 
 
+### Bad Query {#bad-query}
+
+The value of `kylin.query.timeout-seconds` is greater than 60 or equals 0, the max value of `kylin.query.timeout-seconds-coefficient` is the upper limit of double. The result of multiplying two properties is the interval time of detecting bad query, if it equals 0, it will be set to 60 seconds, the max value of it is the upper limit of int.
+
+- `kylin.query.badquery-stacktrace-depth`: specifies the depth of stack trace. The default value is 10.
+- `kylin.query.badquery-history-number`: specifies the showing number of bad query history. The default value is 50.
+- `kylin.query.badquery-alerting-seconds`: The default value is 90, if the time of running is greater than the value of this property, it will print the log of query firstly, including (duration, project, thread, user, query id). Whether to save the recent query, it depends on another property. Secondly, record the stack log, the depth of log depend on another property, so as to the analysis later
+- `kylin.query.badquery-persistent-enabled`: The default value is true, it will save the recent bad query, and cannot override in Cube-level
+
+
 ### Query Pushdown		{#query-pushdown}
 
 - `kylin.query.pushdown.runner-class-name=org.apache.kylin.query.adhoc.PushDownRunnerJdbcImpl`: whether to enable query pushdown