Commit dfd9b49
committed
[KYUUBI #7310] JSON metrics report path supports variables substitution
### Why are the changes needed?
This PR enhances `kyuubi.metrics.json.location` to support variable substitution: `{{KYUUBI_HOME}}`, `{{KYUUBI_WORK_DIR_ROOT}}`, and changes the default value to `{{KYUUBI_HOME}}/metrics` - I suppose it is a more reasonable default value than `{{KYUUBI_WORK_DIR_ROOT}}/metrics`, given others dirs also under `KYUUBI_HOME` by default
```
export KYUUBI_LOG_DIR="${KYUUBI_LOG_DIR:-"${KYUUBI_HOME}/logs"}"
export KYUUBI_PID_DIR="${KYUUBI_PID_DIR:-"${KYUUBI_HOME}/pid"}"
export KYUUBI_WORK_DIR_ROOT="${KYUUBI_WORK_DIR_ROOT:-"${KYUUBI_HOME}/work"}"
```
To make things more consistent, variable substitution behavior is also updated for `kyuubi.metadata.store.jdbc.url`
### How was this patch tested?
Manually tested by
```
bin/kyuubi run \
--conf kyuubi.metrics.reporters=JSON \
--conf kyuubi.metrics.json.location={{KYUUBI_HOME}}/metrics
```
```
bin/kyuubi run \
--conf kyuubi.metrics.reporters=JSON \
--conf kyuubi.metrics.json.location={{KYUUBI_WORK_DIR_ROOT}}/metrics
```
and checks the metrics JSON file.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #7310 from pan3793/json-metrics.
Closes #7310
71e4b28 [Cheng Pan] Update kyuubi-common/src/main/scala/org/apache/kyuubi/Utils.scala
1100283 [Cheng Pan] nit
2b27c38 [Cheng Pan] rename
d6db4e2 [Cheng Pan] fix
0fb1165 [Cheng Pan] JSON metrics report path supports variables substitution
Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: Cheng Pan <chengpan@apache.org>1 parent 69e8e95 commit dfd9b49
File tree
25 files changed
+80
-62
lines changed- docs
- configuration
- deployment
- externals/kyuubi-flink-sql-engine/src/test/scala/org/apache/kyuubi/engine/flink
- integration-tests
- kyuubi-flink-it/src/test/scala/org/apache/kyuubi/it/flink/operation
- kyuubi-hive-it/src/test/scala/org/apache/kyuubi/it/hive/operation
- kyuubi-jdbc-it/src/test/scala/org/apache/kyuubi/it/jdbc
- clickhouse
- doris
- impala
- mysql
- phoenix
- postgresql
- kyuubi-trino-it/src/test/scala/org/apache/kyuubi/it/trino
- server
- kyuubi-common/src/main/scala/org/apache/kyuubi
- config
- kyuubi-metrics/src/main/scala/org/apache/kyuubi/metrics
- kyuubi-server/src/main/scala/org/apache/kyuubi
- engine
- server/metadata/jdbc
- kyuubi-zookeeper/src/main/scala/org/apache/kyuubi/zookeeper
25 files changed
+80
-62
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | 26 | | |
22 | 27 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
0 commit comments