mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
reply on job_id instead of job name
This commit is contained in:
parent
443ec12f66
commit
27b7196961
@ -18,14 +18,13 @@ CLICKHOUSE_CLIENT="$@"
|
|||||||
echo 'digraph {'
|
echo 'digraph {'
|
||||||
echo 'rankdir=LR;'
|
echo 'rankdir=LR;'
|
||||||
|
|
||||||
$CLICKHOUSE_CLIENT --query='select job, status, is_blocked, is_ready, is_executing, pool, dependencies from system.async_loader FORMAT JSON' \
|
$CLICKHOUSE_CLIENT --query='select job, job_id, status, is_blocked, is_ready, is_executing, pool, dependencies from system.async_loader FORMAT JSON' \
|
||||||
| jq -r '
|
| jq -r '
|
||||||
def nodeId: gsub(" "; "_") | gsub("\\."; "__");
|
|
||||||
.data[]
|
.data[]
|
||||||
| { "FgLoad": "box", "BgLoad": "hexagon", "BgStartup": "ellipse" } as $shape
|
| { "FgLoad": "box", "BgLoad": "hexagon", "BgStartup": "ellipse" } as $shape
|
||||||
| { "PENDING": "white", "OK": "lightgreen", "FAILED": "red", "CANCELED": "darkred" } as $fillcolor
|
| { "PENDING": "white", "OK": "lightgreen", "FAILED": "red", "CANCELED": "darkred" } as $fillcolor
|
||||||
| [ "black", "blue", "orange", "yellow" ] as $color
|
| [ "black", "blue", "orange", "yellow" ] as $color
|
||||||
| (.job | nodeId) as $self
|
| (.job_id | tostring) as $self
|
||||||
| [
|
| [
|
||||||
# Nodes
|
# Nodes
|
||||||
$self + " [label=\"" + .job +
|
$self + " [label=\"" + .job +
|
||||||
@ -35,7 +34,7 @@ $CLICKHOUSE_CLIENT --query='select job, status, is_blocked, is_ready, is_executi
|
|||||||
"\"];",
|
"\"];",
|
||||||
|
|
||||||
# Edges
|
# Edges
|
||||||
(.dependencies[] | ($self + " -> " + (. | nodeId) + ";"))
|
(.dependencies[] | ($self + " -> " + (. | tostring) + ";"))
|
||||||
]
|
]
|
||||||
| join("\n")
|
| join("\n")
|
||||||
'
|
'
|
||||||
|
Loading…
Reference in New Issue
Block a user