From 4fe409562ad69eef805d533b19c2eb0e6a45698e Mon Sep 17 00:00:00 2001 From: watermen Date: Fri, 26 Mar 2021 11:56:20 +0800 Subject: [PATCH] [KYUUBI #454] Fix metrics Versions ![watermen](https://badgen.net/badge/Hello/watermen/green) [![Closes #454](https://badgen.net/badge/Preview/Closes%20%23454/blue)](https://github.com/yaooqinn/kyuubi/pull/454) ![27](https://badgen.net/badge/%2B/27/red) ![27](https://badgen.net/badge/-/27/green) ![1](https://badgen.net/badge/commits/1/yellow) ![Target Issue](https://badgen.net/badge/Missing/Target%20Issue/ff0000) ![Test Plan](https://badgen.net/badge/Missing/Test%20Plan/ff0000) [Powered by Pull Request Badge](https://pullrequestbadge.com/?utm_medium=github&utm_source=yaooqinn&utm_campaign=badge_info) Closes #454 from watermen/version. c141344 [watermen] Fix metrics Versions Authored-by: watermen Signed-off-by: Kent Yao --- docs/deployment/settings.md | 8 ++--- docs/deployment/spark/index.rst | 2 +- docs/monitor/metrics.md | 36 +++++++++---------- .../apache/kyuubi/metrics/MetricsConf.scala | 8 ++--- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/deployment/settings.md b/docs/deployment/settings.md index 7577aadd7..d637abe8b 100644 --- a/docs/deployment/settings.md +++ b/docs/deployment/settings.md @@ -170,10 +170,10 @@ kyuubi\.kinit
\.principal|
true
|
Set to true to enable kyuubi metrics system
|
1.1.0
-kyuubi\.metrics\.json
\.report\.location|
metrics
|
Where the json metrics file located
|
1.1.0
-kyuubi\.metrics\.report
\.interval|
PT5S
|
How often should report metrics to json/console. no effect on JMX
|
1.1.0
-kyuubi\.metrics
\.reporters|
JSON
|
A comma separated list for all metrics reporters
  • JSON - default reporter which outputs measurements to json file periodically
  • CONSOLE - ConsoleReporter which outputs measurements to CONSOLE.
  • SLF4J - Slf4jReporter which outputs measurements to system log.
  • JMX - JmxReporter which listens for new metrics and exposes them as namespaced MBeans.
|
1.1.0
+kyuubi\.metrics
\.enabled|
true
|
Set to true to enable kyuubi metrics system
|
1.2.0
+kyuubi\.metrics\.json
\.report\.location|
metrics
|
Where the json metrics file located
|
1.2.0
+kyuubi\.metrics\.report
\.interval|
PT5S
|
How often should report metrics to json/console. no effect on JMX
|
1.2.0
+kyuubi\.metrics
\.reporters|
JSON
|
A comma separated list for all metrics reporters
  • JSON - default reporter which outputs measurements to json file periodically
  • CONSOLE - ConsoleReporter which outputs measurements to CONSOLE.
  • SLF4J - Slf4jReporter which outputs measurements to system log.
  • JMX - JmxReporter which listens for new metrics and exposes them as namespaced MBeans.
|
1.2.0
### Operation diff --git a/docs/deployment/spark/index.rst b/docs/deployment/spark/index.rst index f05e6e16c..545c03b4b 100644 --- a/docs/deployment/spark/index.rst +++ b/docs/deployment/spark/index.rst @@ -2,7 +2,7 @@ :align: center The Engine Configuration Guide -========================== +============================== Kyuubi aims to bring Spark to end-users who need not qualify with Spark or something else related to the big data area. End-users can write SQL queries through JDBC against Kyuubi and nothing more. diff --git a/docs/monitor/metrics.md b/docs/monitor/metrics.md index 878713814..e201056fb 100644 --- a/docs/monitor/metrics.md +++ b/docs/monitor/metrics.md @@ -10,10 +10,10 @@ The metrics system is configured via `$KYUUBI_HOME/conf/kyuubi-defaults.conf`. Key | Default | Meaning | Since --- | --- | --- | --- -kyuubi\.metrics
\.enabled|
true
|
Set to true to enable kyuubi metrics system
|
1.1.0
-kyuubi\.metrics\.json
\.report\.location|
metrics
|
Where the json metrics file located
|
1.1.0
-kyuubi\.metrics\.report
\.interval|
PT5S
|
How often should report metrics to json/console. no effect on JMX
|
1.1.0
-kyuubi\.metrics
\.reporters|
JSON
|
A comma separated list for all metrics reporters
  • JSON - default reporter which outputs measurements to json file periodically
  • CONSOLE - ConsoleReporter which outputs measurements to CONSOLE.
  • SLF4J - Slf4jReporter which outputs measurements to system log.
  • JMX - JmxReporter which listens for new metrics and exposes them as namespaced MBeans.
|
1.1.0
+kyuubi\.metrics
\.enabled|
true
|
Set to true to enable kyuubi metrics system
|
1.2.0
+kyuubi\.metrics\.json
\.report\.location|
metrics
|
Where the json metrics file located
|
1.2.0
+kyuubi\.metrics\.report
\.interval|
PT5S
|
How often should report metrics to json/console. no effect on JMX
|
1.2.0
+kyuubi\.metrics
\.reporters|
JSON
|
A comma separated list for all metrics reporters
  • JSON - default reporter which outputs measurements to json file periodically
  • CONSOLE - ConsoleReporter which outputs measurements to CONSOLE.
  • SLF4J - Slf4jReporter which outputs measurements to system log.
  • JMX - JmxReporter which listens for new metrics and exposes them as namespaced MBeans.
|
1.2.0
## Metrics @@ -22,17 +22,17 @@ These metrics include: Metrics Prefix | Metrics Suffix | Type | Since | Description ---|---|---|---|--- -kyuubi
.exec.pool
.threads.alive ||gauge|1.1.0|
threads keepAlive in the backend executive thread pool
-kyuubi
.exec.pool
.threads.active ||gauge|1.1.0|
threads active in the backend executive thread pool
-kyuubi
.connection.total | | counter | 1.1.0 |
cumulative connection count
-kyuubi
.connection.opened | | gauge | 1.1.0 |
current active connection count
-kyuubi
.connection.opened | `${user}` | counter | 1.1.0 |
cumulative connections requested by a `${user}`
-kyuubi
.connection.failed | | counter | 1.1.0 |
cumulative failed connection count
-kyuubi
.connection.failed | `${user}` | counter | 1.1.0 |
cumulative failed connections for a `${user}`
-kyuubi
.statement.total | | counter | 1.1.0 |
cumulative opened statement count
-kyuubi
.statement.opened | | counter | 1.1.0 |
current opened statement count
-kyuubi
.statement.failed | `${errorType}` | counter | 1.1.0 |
cumulative failed statement for a particular `${errorType}`, e.g. `AnalysisException`
-kyuubi
.engine.total | | counter | 1.1.0 |
cumulative created engines
-kyuubi
.engine.timeout | | counter | 1.1.0 |
cumulative timeout engines
-kyuubi
.engine.failed | `${user}` | counter | 1.1.0 |
cumulative explicitly failed engine count for a `${user}`
-kyuubi
.engine.failed | `${errorType}` | counter | 1.1.0 |
cumulative explicitly failed engine count for a particular `${errorType}`, e.g. `ClassNotFoundException`
+kyuubi
.exec.pool
.threads.alive ||gauge|1.2.0|
threads keepAlive in the backend executive thread pool
+kyuubi
.exec.pool
.threads.active ||gauge|1.2.0|
threads active in the backend executive thread pool
+kyuubi
.connection.total | | counter | 1.2.0 |
cumulative connection count
+kyuubi
.connection.opened | | gauge | 1.2.0 |
current active connection count
+kyuubi
.connection.opened | `${user}` | counter | 1.2.0 |
cumulative connections requested by a `${user}`
+kyuubi
.connection.failed | | counter | 1.2.0 |
cumulative failed connection count
+kyuubi
.connection.failed | `${user}` | counter | 1.2.0 |
cumulative failed connections for a `${user}`
+kyuubi
.statement.total | | counter | 1.2.0 |
cumulative opened statement count
+kyuubi
.statement.opened | | counter | 1.2.0 |
current opened statement count
+kyuubi
.statement.failed | `${errorType}` | counter | 1.2.0 |
cumulative failed statement for a particular `${errorType}`, e.g. `AnalysisException`
+kyuubi
.engine.total | | counter | 1.2.0 |
cumulative created engines
+kyuubi
.engine.timeout | | counter | 1.2.0 |
cumulative timeout engines
+kyuubi
.engine.failed | `${user}` | counter | 1.2.0 |
cumulative explicitly failed engine count for a `${user}`
+kyuubi
.engine.failed | `${errorType}` | counter | 1.2.0 |
cumulative explicitly failed engine count for a particular `${errorType}`, e.g. `ClassNotFoundException`
diff --git a/kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsConf.scala b/kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsConf.scala index f935da775..6c33c9f64 100644 --- a/kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsConf.scala +++ b/kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics/MetricsConf.scala @@ -29,7 +29,7 @@ object MetricsConf { val METRICS_ENABLED: ConfigEntry[Boolean] = buildConf("metrics.enabled") .doc("Set to true to enable kyuubi metrics system") - .version("1.1.0") + .version("1.2.0") .booleanConf .createWithDefault(true) @@ -40,7 +40,7 @@ object MetricsConf { "
  • SLF4J - Slf4jReporter which outputs measurements to system log.
  • " + "
  • JMX - JmxReporter which listens for new metrics and exposes them as namespaced" + " MBeans.
  • ") - .version("1.1.0") + .version("1.2.0") .stringConf .transform(_.toUpperCase()) .toSequence @@ -48,13 +48,13 @@ object MetricsConf { val METRICS_REPORT_LOCATION: ConfigEntry[String] = buildConf("metrics.json.report.location") .doc("Where the json metrics file located") - .version("1.1.0") + .version("1.2.0") .stringConf .createWithDefault("metrics") val METRICS_REPORT_INTERVAL: ConfigEntry[Long] = buildConf("metrics.report.interval") .doc("How often should report metrics to json/console. no effect on JMX") - .version("1.1.0") + .version("1.2.0") .timeConf .createWithDefault(Duration.ofSeconds(5).toMillis) }