すべてのプロダクト
Search
ドキュメントセンター

AnalyticDB:SubmitSparkApp

最終更新日:Mar 17, 2026

Spark アプリケーションを送信します。

操作説明

  • リージョンごとのパブリックエンドポイント: adb.<region-id>.aliyuncs.com。例: adb.cn-hangzhou.aliyuncs.com

  • リージョンごとの Virtual Private Cloud (VPC) エンドポイント: adb-vpc.<region-id>.aliyuncs.com。例: adb-vpc.cn-hangzhou.aliyuncs.com

説明

中国 (青島)、中国 (深セン)、中国 (広州)、または中国 (香港) リージョンで本操作を呼び出した際に HTTP ステータスコード 409 が返された場合は、テクニカルサポートまでお問い合わせください。

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

adb:SubmitSparkApp

create

*SparkApplication

acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}/resourcegroup/{#ResourceGroup}

なし なし

リクエストパラメーター

パラメーター

必須 / 任意

説明

AppName

string

任意

アプリケーションの名前。最大 64 文字まで指定可能です。

TestApp

AppType

string

任意

アプリケーションのタイプ。有効な値は以下のとおりです。

  • SQL

  • STREAMING

  • BATCH(デフォルト)

SQL

Data

string

必須

アプリケーションテンプレートの構成データ。

説明

アプリケーションテンプレートの構成方法については、「Spark アプリケーション構成ガイド」をご参照ください。

conf spark.driver.resourceSpec=small; conf spark.executor.instances=1; conf spark.executor.resourceSpec=small; conf spark.app.name=TestApp;

AgentSource

string

任意

クライアントタイプ。最大 64 文字まで指定可能です。

CONSOLE

AgentVersion

string

任意

クライアントのバージョン。最大 64 文字まで指定可能です。

1.091

DBClusterId

string

必須

Enterprise Edition、Basic Edition、または Data Lakehouse Edition クラスターの ID。

説明

リージョン内のすべての AnalyticDB for MySQL クラスターの ID を照会するには、DescribeDBClusters 操作を呼び出してください。

amv-bp11q28kvl688****

ResourceGroupName

string

必須

ジョブリソースグループの名前。

説明

クラスター内のリソースグループの名前を照会するには、DescribeDBResourceGroup 操作を呼び出してください。

adb

TemplateFileId

integer

任意

アプリケーションテンプレートの ID。

説明

アプリケーションテンプレート ID を照会するには、GetSparkTemplateFullTree 操作を呼び出してください。

15

レスポンスフィールド

フィールド

説明

object

レスポンスパラメーター。

RequestId

string

リクエスト ID。

1AD222E9-E606-4A42-BF6D-8A4442913CEF

Data

object

応答データ。

AppId

string

アプリケーション ID。

s202204132018hzprec1ac61a000****

AppName

string

アプリケーションの名前。

TestApp

Message

string

操作実行時のアラートメッセージ(例:タスク実行失敗、リソース不足など)。アラートが発生しない場合は null が返されます。

Insufficient resources.

State

string

アプリケーションの実行状態。有効な値は以下のとおりです。

  • SUBMITTED

  • STARTING

  • RUNNING

  • FAILING

  • FAILED

  • KILLING

  • KILLED

  • SUCCEEDING

  • COMPLETED

  • FATAL

  • UNKNOWN

SUBMITTED

成功レスポンス

JSONJSON

{
  "RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
  "Data": {
    "AppId": "s202204132018hzprec1ac61a000****",
    "AppName": "TestApp",
    "Message": "Insufficient resources.",
    "State": "SUBMITTED"
  }
}

エラーコード

HTTP ステータスコード

エラーコード

エラーメッセージ

説明

400 Spark.App.ExceedQuotaLimitation The requested resource exceeds the maximum limit: %s
400 Spark.App.InvalidAppTypeWhenSubmit The specified AppType is INVALID or NULL. Please refer to the documentation to correct the parameters for %s.
400 Spark.App.InvalidResourceSpec The requested resource type is not supported:\n %s
400 Spark.App.ParameterConflict Conflicting parameters submitted:\n %s
400 Spark.App.ResourceNegativeError The requested resource MUST be positive: %s
400 Spark.Config.InvalidAppFilePath The main driver file MUST be a valid OSS path. Current is %s.
400 Spark.Config.invalidConnectors The spark.adb.connectors configuration is invalid: %s
400 Spark.Config.InvalidDiskConfig The requested disk mount parameter is invalid: %s
400 Spark.Config.InvalidHostAliasConfig The requested host alias parameter %s is invalid. Example: 127.0.0.1 localhost local
400 Spark.Config.InvalidLogOssPath The OSS address for log storage is illegal: %s
400 Spark.Config.InvalidRoleArnFormat Configure RoleARN %s invalid format. It should match acs:ram::uid_number:role/role_name
400 Spark.Config.InvalidTimeZone Unable to parse time zone configuration %s : %s
400 Spark.Config.MainAppFileNotExists The main driver file is missing, [file] or [sqls] must be configured.
400 Spark.Config.OSSPathAccessError The configured OSS address %s cannot be accessed.
400 Spark.Config.OSSPathNotExists The OSS address %s requested does not exist or the permissions are insufficient.
400 Spark.Config.RoleArnVerifyFailed RoleARN parameter verification failed. Error msg: %s when verify RoleArn %s
400 Spark.Config.SecurityGroupNotFound The security group in the configuration does not exist or cannot be accessed. %s.
400 Spark.Config.VswitchNotFound The vswitch in the configuration does not exist or cannot be accessed. %s.
400 Spark.InvalidParameter Invalid parameter value: %s
400 Spark.InvalidState The object of the operation is in an invalid state: %s
400 Spark.RoleArn.Invalid %s is not found, or the RAM role has not been authorized.
400 Spark.SQL.BlankError Input sql can not be blank string.
400 Spark.SQL.MultipleSQLError Element in field [sqls] can not contain more than one sql statement: %s.
400 Spark.SQL.NotFoundExecutableSQLError No executable statements are submitted. Please check the input SQL.
400 Spark.SQL.ParserError Submit spark app failed when parser SQL %s. Error message: %s.
400 Spark.RoleARN.invalid Current account fails to verify the permissions of the RAM system, please check the help information and configure the appropriate permissions for the current account.
500 Spark.ServerError The Spark control component system encountered an error, please create a ticket to solve the problem or concat the supported engineer on duty. Error message: %s
403 Spark.Forbidden No permissions to access the resources: %s
404 Spark.App.ContentNotFound The requested content %s of the Spark application is not found.
404 Spark.App.NotFound The Spark application %s is not found.
404 Spark.ObjectNotFound The object is not found. More information: %s

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。