文档

GetSparkAppInfo - 查询Spark应用的信息

更新时间:

查看Spark应用的信息。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。
  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。
  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:
    • 对于必选的资源类型,用背景高亮的方式表示。
    • 对于不支持资源级授权的操作,用全部资源表示。
  • 条件关键字:是指云产品自身定义的条件关键字。
  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。
操作访问级别资源类型条件关键字关联操作
adb:GetSparkAppInfoRead
  • DBClusterLakeVersion
    acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}/resourcegroup/{#ResourceGroup}/sparkapp/{#SparkAppId}

请求参数

名称类型必填描述示例值
AppIdstring

应用 ID。

说明 您可以调用 ListSparkApps 接口查询 Spark 应用的 ID。
s202205201533hz1209892000****
DBClusterIdstring

AnalyticDB MySQL 湖仓版(3.0)集群 ID。

说明 您可以调用 DescribeDBClusters 接口查看 AnalyticDB MySQL 湖仓版(3.0)集群的集群 ID。
am-bp11q28kvl688****

返回参数

名称类型描述示例值
object
RequestIdstring

请求 ID。

D65A809F-34CE-4550-9BC1-0ED21ETG380
DataSparkAppInfo

Spark 应用的信息。返回参数说明:

  • Data:Spark 应用模板数据。
  • EstimateExecutionCpuTimeInSeconds:执行 Spark 应用消耗 CPU 的时长,单位毫秒(ms)。
  • LogRootPath:日志文件存储路径。
  • LastAttemptId:重试 ID。
  • WebUiAddress:Web UI 地址。
  • SubmittedTimeInMillis:提交 Spark 应用的时间,Unix 时间戳,单位毫秒(ms)。
  • StartedTimeInMillis:Spark 应用的创建时间,Unix 时间戳,单位毫秒(ms)。
  • LastUpdatedTimeInMillis:最近一次更新 Spark 应用的时间,Unix 时间戳,单位毫秒(ms)。
  • TerminatedTimeInMillis:Spark 应用终止执行的时间,Unix 时间戳,单位毫秒(ms)。
  • DBClusterId:执行 Spark 应用的集群 ID。
  • ResourceGroupName:Job 型资源组名称。
  • DurationInMillis:Spark 应用执行耗时,单位毫秒(ms)。
{ \"name\": \"SparkPi\", \"file\": \"local:///tmp/spark-examples.jar\", \"className\": \"org.apache.spark.examples.SparkPi\", \"args\": [ \"1000000\" ], \"conf\": { \"spark.driver.resourceSpec\": \"small\", \"spark.executor.instances\": 1, \"spark.executor.resourceSpec\": \"small\" } }", "EstimateExecutionCpuTimeInSeconds" : 100, "LogRootPath" : "oss://test/logs/driver", "LastAttemptId" : "s202204291426hzpre60cfabb0000004-0003", "WebUiAddress" : "https://sparkui.aliyuncs.com/token=xxx", "SubmittedTimeInMillis" : 1651213645000, "StartedTimeInMillis" : 1651213645010, "LastUpdatedTimeInMillis" : 1651213645200, "TerminatedTimeInMillis" : 1651213645300, "DBClusterId" : "am-dbclusterid", "ResourceGroupName" : "spark-rg", "DurationInMillis" : 100 }

示例

正常返回示例

JSON格式

{
  "RequestId": "D65A809F-34CE-4550-9BC1-0ED21ETG380",
  "Data": {
    "AppId": "s202207151211hz0c****",
    "AppName": "SparkTest",
    "Priority": "NORMAL",
    "State": "SUBMITTED",
    "Message": "WARN: Disk is full.",
    "Detail": {
      "Data": "{     \"name\": \"SparkPi\",     \"file\": \"local:///tmp/spark-examples.jar\",     \"className\": \"org.apache.spark.examples.SparkPi\",     \"args\": [         \"1000000\"     ],     \"conf\": {         \"spark.driver.resourceSpec\": \"small\",         \"spark.executor.instances\": 1,         \"spark.executor.resourceSpec\": \"small\"     } }",
      "EstimateExecutionCpuTimeInSeconds": 100,
      "LogRootPath": "oss://<bucket-name>/logs/driver",
      "LastAttemptId": "s202204291426hzpre60****-0003",
      "WebUiAddress": "https://adbsparkui-cn-hangzhou.aliyuncs.com/?token=****",
      "SubmittedTimeInMillis": 1651213645000,
      "StartedTimeInMillis": 1651213645010,
      "LastUpdatedTimeInMillis": 1651213645200,
      "TerminatedTimeInMillis": 1651213645300,
      "DBClusterId": "amv-bp11q28kvl688****",
      "ResourceGroupName": "spark-rg",
      "DurationInMillis": 100,
      "AppType": "BATCH"
    },
    "DBClusterId": "amv-23xxxx"
  }
}

错误码

HTTP status code错误码错误信息描述
400Spark.InvalidParameterInvalid parameter value: %s输入参数不正确。
400Spark.InvalidStateThe object of the operation is in an invalid state: %s操作对象处于非合法状态。
400Spark.AnalyzeTask.AppStateNotAcceptedOnly Spark applications in the terminated state can be analyzed. The specified application %s does not meet the requirement.只允许分析处于终止状态的 Spark app。指定 app 不满足条件。
400Spark.AnalyzeTask.FailedToKillFailed to terminate the Spark log analysis task %s, because the task status has changed. Obtain the latest status and try again.杀死Spark日志分析任务的请求执行失败,因为对应任务状态已经发生了变化。请获取分析任务最新状态后执行。
400Spark.AnalyzeTask.InvalidStateWhenAnalyzingAppOnly logs of Spark applications in the terminated state can be analyzed. The specified application %s does not meet the requirement.仅允许针对处于终止状态的Spark作业执行日志分析程序。当前作业不满足条件。
400Spark.App.InvalidResourceSpecThe requested resource type is not supported:\n %s不支持申请的资源机型。
400Spark.App.KillOperationFailedFailed to kill the application %s, please retry in a few seconds.杀死 Spark 应用失败,请稍后重试。
400Spark.App.ParameterConflictConflicting parameters submitted:\n %s提交Spark作业的配置参数存在冲突。
400Spark.Config.invalidConnectorsThe spark.adb.connectors configuration is invalid: %sspark.adb.connectors配置不正确。
400Spark.Config.RoleArnVerifyFailedRoleARN parameter verification failed. Error msg: %s when verify RoleArn %sRoleARN参数校验失败。
400Spark.Log.IllegalPathInvalid job log URI: %s.配置的Spark日志路径不合法:%s。
400Spark.Log.InvalidStateFailed to obtain the logs of the Spark job %s in the %s state.无法获取指定Spark作业的日志。
400Spark.Oss.InternalErrorAn OSS internal error occurred: %sOSS内部错误,请求失败。
400Spark.RoleArn.Invalid%s is not found, or the RAM role has not been authorized.RoleArn不存在或子账号未授权。
400Spark.SQL.NotFoundExecutableSQLErrorNo executable statements are submitted. Please check the input SQL.Spark作业的SQL信息中不包含可执行语句。
400Spark.SQL.ParserErrorFailed to parse the SQL %s. Error message: %s.Spark作业信息中的SQL无法解析。
400Spark.TemplateFile.BadFileTypeThe requested template %s is not a file.请求的模板文件ID不是文件类型的。
403Spark.ForbiddenNo permissions to access the resources: %s权限不足,拒绝访问相关资源。您当前申请访问的信息是:%s。
404Spark.AnalyzeTask.NotFoundThe requested analysis task %s is not found.请求查看的日志分析任务不存在。
404Spark.App.ContentNotFoundThe requested content %s of the Spark application is not found.找不到指定Spark作业的提交内容。
404Spark.Log.PodLogNotFoundCan't find logs of the pod by podName[%s] in the namespace[%s].无法通过podName找到对应pod的日志。
404Spark.ObjectNotFoundThe object is not found. More information: %s操作对象不存在。关联信息:%s。
404Spark.TemplateFile.FileNotFoundThe template file %s is not found.未能找到输入的模板文件。
404Spark.TemplateFile.TemplateNotFoundThe template %s is not found.模板文件未找到。
406Spark.App.KillNotAcceptableCan't kill the application %s in %s state.不能删除处于不可删除状态下的 Spark 应用。
500Spark.ServerErrorThe Spark control component system encountered an error, please create a ticket to solve the problem or concat the supported engineer on duty. Error message: %sSpark管控组件系统遇到错误,请提交工单,或联系值班工程师。
500Spark.Resources.LoadFileFromClasspathFailedCan't load the content from file: %s加载资源文件失败。

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2023-11-24OpenAPI 错误码发生变更、OpenAPI 入参发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    删除错误码:400
    删除错误码:403
    删除错误码:404
    删除错误码:406
    删除错误码:500
入参OpenAPI 入参发生变更
    新增入参:DBClusterId
2023-06-28OpenAPI 错误码发生变更看变更集
变更项变更内容
错误码OpenAPI 错误码发生变更
    错误码 400 变更
    错误码 500 变更
    新增错误码:403
    新增错误码:404
    新增错误码:406
  • 本页导读 (1)
文档反馈