Instance

Last Updated: Jun 21, 2016

Command Format:

  1. SHOW INSTANCES [FROM startdate TO enddate] [number]

Action: Return the instances created by current users.

Parameter:

  • Startdate, enddate: return the instances during specified time period (from startdate to enddate). Support the following format: yyyy-mm-dd, precision to the day. It is optional parameter; return the instances submitted by users in three days if not specified.
  • number: specify the number of instance to be returned. In accordance with the time scheduling, return N (number) instances nearest the current time. If not specified, return all instances that meet the requirement.
  • The output items include: StartTime (the time accurate to seconds), RunTime(s), Status (including Waiting, Success, Failed, Running, Canceled, and Suspended), InstanceID and corresponding SQL:
  1. StartTime RunTime Status InstanceID Query
  2. 2015-04-28 13:57:55 1s Success 20150428055754916grvd5vj4 select * from tab_pack_priv limit 20;
  3. ... ... ... ... ...
  4. ... ... ... ... ...

There are six kinds of instance states:

  • Running
  • Success
  • Waiting
  • Failed
  • Suspended
  • Cancelled

Note: the example given above is running on ODPS client.

Status Instance

Command Format:

  1. STATUS <instance_id>;

Action:

  • Return the status of specified instance, which includes: Success, Failed, Running, and Canceled.
  • If this instance is not created by current user, expection will be thrown.

Description:instance_id: the unique identifier of an instance, to specify which instance to be queried.

Example:

  1. odps@ $project_name>status 20131225123302267gk3u6k4y2;
  2. Success

Query the status of an instance, which ID is 20131225123302267gk3u6k4y2 and the result is Success.

Note: the example given above is running on ODPS client.

Kill Instance

Command Format:

  1. kill <instance_id>;

Action:

  • Stop specified instance and the status of it should be ‘Running’. It is worth to mention that this is an abnormal process and it does not mean that the distributed task has stopped after the system accepts the request and returns result. So whether the instance is killed should be confirmed after using ‘status’ command to view the instance status after running this command.

Parameter:

instance_id: the unique identifier of an instance, which should be ID of an instance which status is ‘Running’, otherwise, an error will be thrown.

Example:

  1. odps@ $project_name>kill 20131225123302267gk3u6k4y2;

Stop the instance which ID is 20131225123302267gk3u6k4y2.

Note: the example given above is running on ODPS client.

Thank you! We've received your feedback.