UltipaDocs
Try Playground
  • Introduction
  • Terminologies
    • Reserved Words
    • Data Types
    • Alias
    • Operators
    • Expression
    • Filter
    • Prefix
    • Node and Edge Templates
    • Homologous and Heterologous Data
    • Clause Execution Times
    • Graphset
    • Schema
    • Property
    • Insert
    • Overwrite
    • Upsert
    • Update
    • Delete
    • Find Nodes
    • Find Edges
      • AB
      • Autonet
      • Spread
      • Path Template
      • K-Hop
      • K-Hop Template
    • Find Subgraphs
    • GROUP BY
    • ORDER BY
    • SKIP
    • LIMIT
    • WHERE
    • RETURN
    • WITH
    • UNCOLLECT
    • UNION
    • UNION ALL
    • CALL
    • BATCH
      • Schema Checker
      • Equal
      • Not Equal
      • Less Than
      • Greater Than
      • Less Than or Equal
      • Greater Than or Equal
      • Between
      • Between or Equal
      • Beong to
      • Not Belong To
      • CONTAINS | String
      • CONTAINS | Full-Text
      • Regular Match
      • IS NULL
      • IS NOT NULL
      • And
      • Or
      • Not
      • Exclusive OR
      • DISTINCT
      • toString()
      • toInteger()
      • toFloat()
      • toDouble()
      • toDecimal()
      • toSet()
      • castToRaw()
      • now()
      • dateAdd()
      • dateDiff()
      • year()
      • month()
      • day()
      • dayOfWeek()
      • dateFormat()
      • point()
      • distance()
      • pointInPolygon()
      • lower()
      • upper()
      • reverse()
      • startsWith()
      • endsWith()
      • JSON_decode()
      • JSON_merge()
      • trim()
      • ltrim()
      • rtrim()
      • left()
      • right()
      • substring()
      • replace()
      • split()
      • intersection()
      • difference()
      • listUnion()
      • size()
      • head()
      • reduce()
      • listContains()
      • append()
      • pi()
      • pow()
      • sqrt()
      • abs()
      • floor()
      • ceil()
      • round()
      • sin()
      • cos()
      • tan()
      • cot()
      • asin()
      • acos()
      • atan()
      • length()
      • pnodes()
      • pedges()
      • count()
      • sum()
      • max()
      • min()
      • avg()
      • stddev()
      • collect()
      • dedup()
      • CASE
      • table()
      • coalesce()
      • ifnull()
    • Acceleration
    • Index
    • Full-text
    • LTE
    • Real-time Process
    • Backend Task
    • Analytics Node
    • Server Statistics
    • Server Backup
    • Privilege
    • Policy
    • User
  • Trigger
  1. Docs
  2. /
  3. UQL
  4. /
  5. Process | Task | Server

Backend Task

The algorithms adopting write() parameter for write-disk operation will be run as tasks in background. The execution result of backend task will be stored in the GraphSet against which it runs, and can be retrieved by user whenever needed until the task is deleted from the Ultipa Server.

Valid operations on backend task of different status:

StatusDescriptionshow()stop()clear()
pendingQueuing, not executed yet√√
computingComputing√√
writingWriting√
stoppedStopped√√
failedFailed√√
doneDone√√
NOTE

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:

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"

UQL
show().task("khop_all", "*")

Example: Show all algorithm backend tasks that are computing

UQL
show().task("*", "computing")

Stop Backend Task

A stopped task cannot be restarted.

Syntax:

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>)

Clear Backend Task

Clearing a task will delete all the information of this task from the Ultipa server.

Syntax:

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

UQL
clear().task("*")

Example: Clear algorithm backend task with id = 12

UQL
clear().task(12)

Example: Clear all "khop_all" backend tasks that are pending

UQL
clear().task("khop_all", "pending")