The algorithms involving write-disk operation (i.e. write()
parameter is used in algo()
command) will be run as backend tasks. To facilitate users observing and managing the execution state of algorithms and checking the algorithm results, UQL supports below operations on backend tasks in different status:
Status | Description | clear() |
stop() |
---|---|---|---|
pending | Queuing, not executed yet | √ | |
computing | Computing | √ | |
writing | Writing | ||
stopped | Stopped | √ | |
failed | Failed | √ | |
done | Done | √ |
Please refer to the algorithm handbook Ultipa Graph Analytics & Algorithms for the usage of parameter write()
.
Show Backend Task
Returned table name: _task
Returned table header: id
| name
| params
| start
| egnineTime
| totalTime
| result
| status
(the id, name, parameters, start time, engine duration (second), total duration (second), result and current status of the algorithm backend task)
Syntax:
// To show all algorithm backend tasks in the current graphset
show().task()
// To show a certain algorithm backend task in the current graphset
show().task(<id>)
// To show all tasks of a certain algorithm in the current graphset
show().task("<taskName>", "*")
// To show all algorithm backend tasks of a certain status in the current graphset
show().task("*", "<status>")
// To show all tasks of a certain algorithm and status in the current graphset
show().task("<taskName>", "<status>")
Example: Show all algorithm backend tasks of "khop_all"
show().task("khop_all", "*")
Example: Show all algorithm backend tasks that are computing
show().task("*", "computing")
Clear Backend Task
Syntax:
// To clear all algorithm backend tasks in the current graphset (excluding those whose status are computing and writing)
clear().task("*")
// To clear a certain algorithm backend task in the current graphset (excluding those whose status are computing and writing)
clear().task(<id>)
// To clear all tasks of a certain algorithm in the current graphset (excluding those whose status are computing and writing)
clear().task("<taskName>", "*")
// To clear all algorithm backend tasks of a certain status in the current graphset (excluding those whose status are computing and writing)
clear().task("*", "<status>")
// To clear all tasks of a certain algorithm and status in the current graphset (excluding those whose status are computing and writing)
clear().task("<taskName>", "<status>")
Example: Clear all algorithm backend tasks
clear().task("*")
Example: Clear algorithm backend task with id = 12
clearTask().id(12)
Example: Clear all "khop_all" backend tasks that are pending
clear().task("khop_all", "pending")
Stop Backend Task
Syntax:
// To stop all backend tasks that are computing in the current graphset
stop().task("*")
// To stop a certain backend task that is computing in the current graphset
stop().task(<id>)