/AWS1/IF_EMR=>CANCELSTEPS()¶
About CancelSteps¶
Cancels a pending step or steps in a running cluster. Available only in Amazon EMR versions 4.8.0 and later, excluding version 5.0.0. A maximum of 256 steps are allowed in
each CancelSteps request. CancelSteps is idempotent but asynchronous; it does not guarantee
that a step will be canceled, even if the request is successfully submitted. When you use
Amazon EMR releases 5.28.0 and later, you can cancel steps that are in a
PENDING or RUNNING state. In earlier versions of Amazon EMR, you can only cancel steps that are in a PENDING state.
Method Signature¶
METHODS /AWS1/IF_EMR~CANCELSTEPS
IMPORTING
!IV_CLUSTERID TYPE /AWS1/EMRXMLSTRINGMAXLEN256 OPTIONAL
!IT_STEPIDS TYPE /AWS1/CL_EMRSTEPIDSLIST_W=>TT_STEPIDSLIST OPTIONAL
!IV_STEPCANCELLATIONOPTION TYPE /AWS1/EMRSTEPCANCLATIONOPTION OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_emrcancelstepsoutput
RAISING
/AWS1/CX_EMRINTERNALSERVERERR
/AWS1/CX_EMRINVALIDREQUESTEX
/AWS1/CX_EMRCLIENTEXC
/AWS1/CX_EMRSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_clusterid TYPE /AWS1/EMRXMLSTRINGMAXLEN256 /AWS1/EMRXMLSTRINGMAXLEN256¶
The
ClusterIDfor the specified steps that will be canceled. Use RunJobFlow and ListClusters to get ClusterIDs.
it_stepids TYPE /AWS1/CL_EMRSTEPIDSLIST_W=>TT_STEPIDSLIST TT_STEPIDSLIST¶
The list of
StepIDsto cancel. Use ListSteps to get steps and their states for the specified cluster.
Optional arguments:¶
iv_stepcancellationoption TYPE /AWS1/EMRSTEPCANCLATIONOPTION /AWS1/EMRSTEPCANCLATIONOPTION¶
The option to choose to cancel
RUNNINGsteps. By default, the value isSEND_INTERRUPT.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_emrcancelstepsoutput /AWS1/CL_EMRCANCELSTEPSOUTPUT¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->cancelsteps(
it_stepids = VALUE /aws1/cl_emrstepidslist_w=>tt_stepidslist(
( new /aws1/cl_emrstepidslist_w( |string| ) )
)
iv_clusterid = |string|
iv_stepcancellationoption = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_cancelstepsinfolist( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_stepid = lo_row_1->get_stepid( ).
lv_cancelstepsrequeststatu = lo_row_1->get_status( ).
lv_string = lo_row_1->get_reason( ).
ENDIF.
ENDLOOP.
ENDIF.