Queries the log content of a Spark job run.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
emr-serverless-spark:ListLogContents |
none |
*All Resource
|
None | None |
Request syntax
GET /api/v1/workspaces/{workspaceId}/action/listLogContents HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| workspaceId |
string |
No |
The workspace ID. |
w-72704d9fb0****** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| fileName |
string |
No |
The full path of the log file. |
oss://datadev******.cn-hangzhou.oss-dls.aliyuncs.com/w-72704d9fb0******/spark/logs/jr-af51aa63cc******/driver/stdout.log |
| offset |
integer |
No |
The start line number for the query. |
0 |
| length |
integer |
No |
The length of the log. |
9999 |
| regionId |
string |
No |
The region ID. |
cn-hangzhou |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The returned data. |
||
| listLogContent |
object |
The log content. |
|
| contents |
array<object> |
The list of log line contents. |
|
|
object |
|||
| LineContent |
string |
The content of a log line. |
spark pi is 3.14\n |
| totalLength |
integer |
The total number of log lines. |
10 |
| requestId |
string |
The request ID. |
DD6B1B2A-5837-5237-ABE4-FF0C8944**** |
Examples
Success response
JSON format
{
"listLogContent": {
"contents": [
{
"LineContent": "spark pi is 3.14\\n"
}
],
"totalLength": 10
},
"requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944****"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.