/// <summary> /// Kill a statement within a session. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='sessionId'> /// Identifier for the session. /// </param> /// <param name='statementId'> /// Identifier for the statement. /// </param> /// <param name='requestedBy'> /// Add default value for X-Requested-By in header. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SparkStatementCancellationResult> DeleteSparkStatementJobAsync(this IJobOperations operations, int sessionId, int statementId, string requestedBy = "ambari", CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteSparkStatementJobWithHttpMessagesAsync(sessionId, statementId, requestedBy, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }