Lists Spark applications.
Operation description
Public endpoint:
adb.<region-id>.aliyuncs.com. For example,adb.cn-hangzhou.aliyuncs.com.VPC endpoint:
adb-vpc.<region-id>.aliyuncs.com. For example,adb-vpc.cn-hangzhou.aliyuncs.com.
If you receive a 409 error when you send a request from the China (North) 1 (Qingdao), China (South) 1 (Shenzhen), China (South) 3 (Guangzhou), or China (Hong Kong) region, contact technical support.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
adb:ListSparkApps |
list |
*DBClusterLakeVersion
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The ID of the Data Lakehouse Edition cluster. |
amv-bp11q28kvl688**** |
| ResourceGroupName |
string |
No |
The name of the job resource group. |
test_instance |
| PageNumber |
integer |
Yes |
The page number. The value must be a positive integer. The default value is 1. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Valid values:
|
30 |
| Filters |
string |
No |
The filter conditions, which are a JSON-formatted string. The following keys are supported:
The start time and end time filter conditions use the following substructure to specify a range:
|
{ "SubmittedTimeRang": { "Max": 10000, "Min": 0 }, "TerminatedTimeRange": { "Max": 10000, "Min": 0 }, "AppStates": ["STARTING"], "AppId": "adc", "AppNameRegex": "cde", "AttemptId": "abc-001" } |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
10 |
| TotalCount |
integer |
The total number of entries. |
1 |
| RequestId |
string |
The request ID. |
D65A809F-34CE-4550-9BC1-0ED21ETG380 |
| Data |
object |
The returned data. |
|
| AppInfoList |
array |
The list of application information. The following parameters are returned:
|
|
| SparkAppInfo |
The list of application information. The following parameters are returned:
|
{ "AppId": "test-app-id", "State": "Running", "Detail": { "LastAttemptId": "0001", "WebUiAddress": "http://spark-ui:4040", "SubmittedTimeInMillis": 1644805200260, "DBClusterId": "db", "EstimateExecutionCpuTimeInSeconds": 1644812400, "AppConf": "{}", "StartedTimeInMillis": 1644806400260, "LastUpdatedTimeInMillis": 1644808800260, "ResourceGroupName": "rg" }, "AppName": "test app name" } |
|
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries per page. |
10 |
| TotalCount |
integer |
The total number of entries. |
1 |
Examples
Success response
JSON format
{
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 1,
"RequestId": "D65A809F-34CE-4550-9BC1-0ED21ETG380",
"Data": {
"AppInfoList": [
{
"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:///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"
}
],
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 1
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Spark.InvalidParameter | Invalid parameter value: %s | Incorrect input parameter:%s. |
| 400 | Spark.InvalidState | The object of the operation is in an invalid state: %s | The operation object is invalid. |
| 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 | An error occurred on the Spark control component system. Submit a ticket or contact technical support. |
| 403 | Spark.Forbidden | No permissions to access the resources: %s | Insufficient permissions to access the related resources. Information that you want to access: %s. |
| 404 | Spark.ObjectNotFound | The object is not found. More information: %s |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.