All Products
Search
Document Center

E-MapReduce:ListLivyComputeSessions

Last Updated:Jun 11, 2026

Menampilkan daftar sesi historis untuk Livy Gateway.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tidak ada otorisasi untuk operasi ini. Jika Anda mengalami masalah saat menjalankan operasi ini, hubungi dukungan teknis.

Sintaks permintaan

GET /api/v1/workspaces/{workspaceId}/livycompute/{livyComputeId}/session HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

workspaceId

string

No

ID ruang kerja.

w-d80f373d3ace824f

livyComputeId

string

No

ID Livy Gateway.

lc-zm4dzdiubu73w2yx

Parameter permintaan

Parameter

Type

Required

Description

Example

pageNum

integer

No

Nomor halaman. Nilai default: 1.

1

pageSize

integer

No

Jumlah entri per halaman. Nilai default: 20. Nilai minimum: 1. Nilai maksimum: 100.

20

regionId

string

No

ID wilayah.

cn-hangzhou

Elemen respons

Element

Type

Description

Example

object

The response schema.

requestId

string

The request ID.

8FAA8EEC-3026-5D15-8733-4E2A3DD970A1

totalCount

integer

The total number of entries.

10

sessions

array<object>

The list of sessions.

object

name

string

The session name.

test_session

computeId

string

The ID of the Livy Gateway.

lc-xxxxxx

sessionId

string

The ID of the Livy Gateway session.

livy-xxxxxx

sparkConf

string

The Spark job configuration.

{ "proxyUser": "test", "conf": { "spark.driver.cores": 1 } }

state

string

The session state.

  • starting: The session is starting.

  • running: The session is running.

  • terminating: The session is being terminated.

  • terminated: The session is terminated.

  • error: The session failed.

running

info

string

The runtime information.

null

createTime

integer

The time when the session was created. This is a UNIX timestamp in milliseconds.

1768213240000

webUI

string

The web UI URL of the session.

http://emr-spark-ui-cn-hangzhou.data.aliyun.com

endTime

integer

The time when the session ended. This is a UNIX timestamp in milliseconds.

1768213240000

queue

string

The queue name.

root_queue

cuHours

number

The number of compute units (CUs) consumed during the task execution. This is an estimated value. The actual value is subject to the bill.

322.5

vcoreSeconds

integer

The total number of vCores allocated to the task multiplied by the number of seconds the task has been running.

343

mbSeconds

integer

The total amount of memory in MB allocated to the task multiplied by the number of seconds the task has been running.

1098888

Contoh

Respons sukses

JSONformat

{
  "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
    }
  ]
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.