最近更新时间:2023.05.11 16:26:02
首次发布时间:2023.05.11 16:17:42
调用 DescribeApplicationInstance 接口,查询任务的目标实例的详情。
一般是由运维人员(Project_OPS)负责任务启动、停止、下线等运维工作,请确保操作者已添加项目成员并为其关联角色,请参见权限概述。
参数 | 类型 | 是否必填 | 示例值 | 说明 |
---|---|---|---|---|
InstanceId | string | 是 | 16481**2969601 | 任务的某个实例的 ID。 |
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
SqlText | string | select * from | SQL 语句。 |
DeployRequest | object(POSTApiV1AppInstanceGetDeployRequest) | - | 任务部署策略,详情请参见 POSTApiV1AppInstanceGetDeployRequest 数据结构。 |
ApplicationType | string | SPARK_BATCH_SQL | 任务类型。可能的取值如下:
|
Image | string | 192.168..:30004/open_platform/streamx:888 | 用户自定义镜像。 |
RestUrl | string | /ui/s-166209-driver-svc.doc-spark-pool-q0xt-00**5:4040/jobs | 任务相对路径。 |
ProjectId | string | w4***rd65 | 任务所属项目的 ID。 |
UserId | string | 6e224069****cc1517306a | 任务创建者的 ID。 |
EngineVersion | string | SPARK_VERSION_3_0_1_OS | 引擎版本。可能的取值如下:
|
EndTime | string | 2023-04-18 10:43:47 | 任务实例停止时间。 |
Conf | Map<String,String> | { | 任务额外自定义配置参数。 |
Duration | Long | 190000 | 任务运行时长,格式为毫秒级时间戳。 |
ApplicationName | string | spark-application-1 | 任务名称。 |
ApplicationTrn | string | 1646***3459458 | 任务 ID。 |
VersionId | Long | 162541**800990722 | 作业实例内容的版本号,版本号由每次作业从草稿状态上线到作业时产生。 |
Args | string | 3 60 | 任务启动类的参数。 |
Jar | string | 5eb5896a**70108933 | 任务资源文件路径或元数据 ID。
|
MainClass | string | com.bytedance.openplatform.SparkPi | Jar 类型任务的启动类。 |
StartTime | string | 2023-04-18 10:40:37 | 任务实例启动时间。 |
DeploymentId | string | 2cd894a3***da17a591227 | 任务实例的 DeploymentId。 |
Dependency | object(POSTApiV1AppInstanceGetDependency) | - | 任务的依赖文件,详情请参见 POSTApiV1AppInstanceGetDependency 数据结构。 |
State | string | SUCCEEDED | 任务实例的状态。可能的取值如下:
|
InstanceId | string | 16481***30828290 | 任务实例 ID。 |
POSTApiV1AppInstanceGetDeployRequest 数据结构
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
Priority | string | 3 | 任务优先级。 |
ResourcePoolTrn | string | doc-resource-1-***226 | 任务运行资源池的唯一标识符。 |
SchedulePolicy | string | GANG | 任务调度策略:
|
ScheduleTimeout | string | 0 | 设置为 GANG 调度策略时,需要设置调度时长,单位为秒。 |
POSTApiV1AppInstanceGetDependency 数据结构
参数 | 类型 | 示例值 | 说明 |
---|---|---|---|
Archives | list | ["file_id", "tos://***"] | Spark 任务的依赖文件,支持文件路径或元数据 ID。 |
Jars | list | ["file_id", "tos://***"] | Spark 任务的依赖文件,支持文件路径或元数据 ID。 |
Files | list | ["file_id", "tos://***"] | Spark 任务的依赖文件,支持文件路径或元数据 ID。 |
PyFiles | list | ["file_id", "tos://***"] | Spark 任务的依赖文件,支持文件路径或元数据 ID。 |
POST https://open.volcengineapi.com?Action=DescribeApplicationInstance&Version=2021-06-01 Content-Type: application/json Region: cn-beijing ServiceName: spark { "InstanceId": "164816**2969601" }
{ "ResponseMetadata": { "RequestId": "20230418143632F4A66B54C3B5D9890567", "Action": "DescribeApplicationInstance", "Version": "2021-06-01", "Service": "spark", "Region": "cn-beijing" }, "Result": { "InstanceId": "16481**2969601", "ApplicationType": "SPARK_BATCH_SQL", "ProjectId": "qh8i**e0xt", "AccountId": "2100**734", "UserId": "6e2240691f**1892cc1517306a", "DeployRequest": { "Priority": "5", "ResourcePoolTrn": "doc-resource-1-***226", "SchedulePolicy": "DRF", "ScheduleTimeout": "0" }, "EngineVersion": "SPARK_VERSION_3_0_1_OS", "SqlText": "select * from `docdb`.`hivetable`;", "Conf": {}, "State": "STOPPED", "Cluster": "16a119e0d5d**cd041ae2627b0", "DeploymentId": "90a311b5**aa92a72c768d8fd9", "RestUrl": "/ui/spark-history-server:18080/history/s-16481***22969601/jobs", "ApplicationTrn": "16481**090945", "StartTime": "2023-04-18 11:23:04", "EndTime": "2023-04-18 11:23:27", "Duration": 23000 } }