WAIT

Updated at:

Retrieves the execution log for a job by instance ID, including the Logview URL for detailed diagnostics.

Syntax

Note

Logview links for instances created within the last 3 days open normally. Links for older instances can be retrieved but will not open because the underlying data has expired.

wait <instance_id>;

Parameters

instance_id: The unique identifier of the instance. The ID follows the format 20170925161122379gxxxxxx. Retrieve it from the output of a SQL execution or by running the SHOW command.

Examples

Retrieve the execution log for instance 20170925161122379gxxxxxx:

wait 20170925161122379gxxxxxx;

Output:

ID = 20170925161122379g3xxxxxx
Log view:
http://logview.odps.aliyun.com/logview/?h=http://service.odps.aliyun.com/api&p=alian&i=201709251611223xxxxxxdqp&token=XXXXXXvbiI6IjEifQ==
Job Queueing...
Summary:
resource cost: cpu 0.05 Core * Min, memory 0.05 GB * Min
inputs:
        alian.bank_data: 41187 (588232 bytes)
outputs:
        alian.result_table: 8 (640 bytes)
Job run time: 2.000
Job run mode: service job
Job run engine: execution engine
M1:
        instance count: 1
        run time: 1.000
        instance time:
                min: 1.000, max: 1.000, avg: 1.000
        input records:
                TableScan_REL5213301: 41187  (min: 41187, max: 41187, avg: 41187
)
        output records:
                StreamLineWrite_REL5213305: 8  (min: 8, max: 8, avg: 8)
R2_1:
        instance count: 1
        run time: 2.000
        instance time:
                min: 2.000, max: 2.000, avg: 2.000
        input records:
                StreamLineRead_REL5213306: 8  (min: 8, max: 8, avg: 8)
        output records:
                TableSink_REL5213309: 8  (min: 8, max: 8, avg: 8)

The output includes a job-level summary followed by stage details. Key fields are described below.

Job-level fields

Field

Description

resource cost

Total CPU and memory consumed by the job.

inputs / outputs

Source and destination tables with row counts and data sizes.

Job run time

Total elapsed time of the job, in seconds.

Job run mode

Execution mode, such as service job.

Job run engine

Execution engine used, such as execution engine.

Stage details (M1, R2_1, ...)

Each labeled block (for example, M1 for Map stage 1, R2_1 for Reduce stage 2 task 1) reports the following fields per stage:

Field

Description

instance count

Number of parallel instances that ran for this stage.

run time

Elapsed time for this stage, in seconds.

instance time

Min, max, and average run time across all instances in this stage.

input records

Rows read by each operator in this stage, with min/max/avg per instance.

output records

Rows written by each operator in this stage, with min/max/avg per instance.

Related commands

  • SHOW: Lists instance information, including StartTime, RunTime, Status, InstanceID, Owner, and Query.

  • STATUS: Checks the status of a specified instance.

  • TOP INSTANCE: Lists instances currently running in a project.

  • KILL: Stops a specified instance.

  • DESC INSTANCE: Retrieves job details for a specified instance, including the SQL statement, Owner, StartTime, EndTime, and Status.