获取Livy Gateway的历史Session。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
GET /api/v1/workspaces/{workspaceId}/livycompute/{livyComputeId}/session HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| workspaceId |
string |
否 |
工作空间 ID。 |
w-d80f373d3ace824f |
| livyComputeId |
string |
否 |
Livy Gateway 的 ID。 |
lc-zm4dzdiubu73w2yx |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| pageNum |
integer |
否 |
页码,默认值 1。 |
1 |
| pageSize |
integer |
否 |
返回结果的分页数。默认值:20,最小值:1,最大值:100。 |
20 |
| regionId |
string |
否 |
区域 ID。 |
cn-hangzhou |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| requestId |
string |
请求 ID。 |
8FAA8EEC-3026-5D15-8733-4E2A3DD970A1 |
| totalCount |
integer |
总数。 |
10 |
| sessions |
array<object> |
Session 列表。 |
|
|
object |
|||
| name |
string |
Session 名称。 |
test_session |
| computeId |
string |
Livy Gateway 的 ID。 |
lc-xxxxxx |
| sessionId |
string |
Livy Gateway Session 的 ID。 |
livy-xxxxxx |
| sparkConf |
string |
Spark 任务配置。 |
{ "proxyUser": "test", "conf": { "spark.driver.cores": 1 } } |
| state |
string |
Session 状态。
|
running |
| info |
string |
运行信息。 |
null |
| createTime |
integer |
创建时间,unix 毫秒级别时间戳。 |
1768213240000 |
| webUI |
string |
Session 的 Web UI 地址。 |
http://emr-spark-ui-cn-hangzhou.data.aliyun.com |
| endTime |
integer |
结束时间,unix 毫秒级别时间戳。 |
1768213240000 |
| queue |
string |
队列名称。 |
root_queue |
| cuHours |
number |
任务运行周期内所消耗的 CU 数量(该值为预估值,最终以账单为准)。 |
322.5 |
| vcoreSeconds |
integer |
任务已分配的 vcore 总量乘以任务已运行的秒数。 |
343 |
| mbSeconds |
integer |
任务已分配的内存总量乘以任务已运行的秒数。 |
1098888 |
示例
正常返回示例
JSON格式
{
"requestId": "8FAA8EEC-3026-5D15-8733-4E2A3DD970A1",
"totalCount": 10,
"sessions": [
{
"name": "test_session",
"computeId": "lc-xxxxxx",
"sessionId": "livy-xxxxxx",
"sparkConf": "{\n \"proxyUser\": \"test\",\n \"conf\": {\n \"spark.driver.cores\": 1\n }\n}",
"state": "running",
"info": "null",
"createTime": 1768213240000,
"webUI": "http://emr-spark-ui-cn-hangzhou.data.aliyun.com",
"endTime": 1768213240000,
"queue": "root_queue",
"cuHours": 322.5,
"vcoreSeconds": 343,
"mbSeconds": 1098888
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。