All Products
Search
Document Center

MaxCompute:Task

Last Updated:Feb 19, 2024

A task is the basic computing unit of MaxCompute. You can write SQL or MapReduce programs to express the data processing logic, and then submit the programs to MaxCompute for execution. MaxCompute converts the programs into one or more tasks and executes the tasks in parallel in a distributed environment.

MaxCompute parses most of the tasks that you submit, especially computing tasks such as SQL DML statements and MapReduce tasks. Then, MaxCompute generates task execution plans based on the parsing results. An execution plan consists of several mutually dependent stages.

The execution plan can be logically defined as a directed graph. In this graph, vertices represent stages, and edges represent dependencies between the stages. MaxCompute executes the stages based on the dependencies in the graph (execution plan). A stage has multiple processes, also known as workers. The workers in each stage work together to complete data computations for the stage. Different workers in a stage process different data, but they all use the same execution logic. A computing task is instantiated as an instance when it is executed. You can perform operations on the instance. For example, you can run the status command to query the instance status and the kill command to terminate the instance.

Some MaxCompute tasks, such as SQL DDL statements, are not computing tasks. These tasks only need to read and modify metadata in MaxCompute. MaxCompute cannot generate execution plans for these tasks.

Note

MaxCompute does not convert all the requests to tasks. For example, operations on projects, resources, user-defined functions (UDFs), and instances are not processed as tasks.

References

You can use the EXPLAIN statement to view the execution plan structure of DML statements of MaxCompute SQL. For more information, see EXPLAIN.