Change Password

Input error
Input error
Input error
Submit
v2.x

Task

uQL supports task management that allows users to check the status of tasks and processes, and stop or clear a certain task or all tasks. Task management provides users the opportunity to understand the Ultipa system workload and status so as to improvise accordingly.

There are 2 major categories of Ultipa tasks:

Category Definition
Runtime uQL Process Real-time tasks or operations excluding those algorithmic tasks, such as queries, insertions or modifications.
Algorithm Task Algorithm tasks that are usually time-consuming, such as Louvain community detection, triangle counting, etc.

Run-time uQL Process

All non-algorithm tasks are considered and categorized as run-time uQL processes. To be accurate, some algorithm tasks are also categorized as run-time uQL processes as they run in real-time, such as node-level degree and centrality operations.

Run-time uQL processes can be managed with the following commands.

top()

To check run-time uQL process:

top()

kill()

To stop a run-time uQL process by the ID of process:

kill(<process_id>)

To stop all run-time uQL processes:

kill().all()

Algorithm Task

Ultipa offers a large collection of algorithms that run with great parallelism and engineering optimization on large datasets, most of which have achieved near-real-time or T+0 latency instead of T+1 or longer. All these algorithms run with minimal run-time RAM so that the operating system stays more stable comparing to other graph systems.

This section covers operations that can be done against algorithm tasks.

showTask()

The components of uQL to show algorithm tasks:

Type Components
Command showTask()
Parameter id(<>), name(<>), status(<>), limit(<>)
Return A list of algorithm tasks with information

Values of parameter:

Name Data Type Specification Description
id int task ID (Optional) To show task with the specified task ID
name string task name (Optional) To show tasks with the specified task name
status string task status (Optional) To show tasks with the specified task status
limit int >0 (Optional) To show the latest N tasks (the top N tasks in start-time descending fashion)

Additional instructions:

  • when no parameter is included in the uQL, the command showTask() will return all the tasks;
  • id() is not to be used with other parameters;
  • a list of valid task names can be obtained via uQL listAlgo();
  • valid task status are: pending, computing, writing, failed, stopped, done.

Example 1: Show all the tasks:

showTask()

Exmaple 2: Show the most-recent 5 tasks:

showTask().limit(5)

Example 3: Show the most recent 5 'louvain' tasks:

showTask().name(louvain).limit(5)

Example 4: Show 'k_hop' tasks that are done:

showTask().name(k_hop).status(done)

Running Example 4 within Ultipa-Manager will get this:

Figure: Show k_hop Tasks That Are Done

clearTask()

Tasks that are pending, failed, stopped or done can be cleared.

The components of uQL to clear algorithm tasks:

Type Components
Command clearTask()
Parameter id(<>) or name(<>) or status(<>) or all()
Return (operational status))

Values of parameter:

Name Data Type Specification Description
id int task ID (Optional) To clear task with the specified task ID
name string task name (Optional) To clear tasks with the specified task name
status string task status (Optional) To clear tasks with the specified task status
all / / (Optional) To clear all tasks

Additional instructions:

  • command showTask() shall be followed by at least one parameter;
  • id() and all() are not to be used with other parameters;
  • a list of valid task names can be obtained via uQLlistAlgo();
  • valid task status are: pending, failed, stopped, done.

Example 1: Clear all the tasks:

clearTask().all()

Example 2: Clear the task (id = 1):

clearTask().id(1)

Example 3: Clear all the 'k_hop' tasks:

clearTask().name(k_hop)

Example 4: Clear all the pending tasks:

clearTask().status(pending)

stopTask()

Tasks that are pending, computing or writing can be stopped.

To stop or cancel a task:

stopTask().id(<id>)