IDAX.CANCEL_APP - Cancel a Spark application

Use this procedure to cancel a running Spark application. If the procedure returns without error message, the application is canceled successfully.

Authorization

The privileges held by the authorization ID of the statement must include the IDAX_USER role.

Syntax

IDAX.CANCEL_APP(in submission_id varchar(1024) default NULL)

Parameter descriptions

submission_id
Optional.
The submission ID of the Spark application that is to be canceled.
If no argument (or NULL) is specified, the latest application that was submitted in this database session is canceled.
Data type: VARCHAR(1024)

Returned information

The procedure does not return any SQL results.

If the application is not running or if it cannot be canceled, you get an error message.

Example

$ db2 "call idax.glm('intable=iris, model=iris_model_3, id=id, target=petallength', false)" # false : asynchronous execution
  Return Status = 0
 
$ db2 "call idax.cancel_app()"
  Return Status = 0
 
$ db2 "call idax.app_status()"
  Result set 1
  --------------
  SUBMISSION_ID        STATUS RC  MESSAGE
  -------------------- ------ --- -------
  20160907133633902000 ended  143
  1 record(s) selected.
 
$ db2 "call idax.cancel_app()"
SQL0438N  Application raised error or warning with diagnostic text:
"CDFAA0803E Spark application cancelation error: Application does not e"
 
$ db2 "values cast(idax.last_message as varchar(128))"
1
--------------------------------------------------------------------------------------------------------------------------------
CDFAA0803E Spark application cancelation error: Application does not exist or already ended (with no log information retained)..
1 record(s) selected.