Skip to content

[ZEPPELIN-6574] Add read-only REST API for interpreter process status - #5403

Open
hyunw9 wants to merge 2 commits into
apache:masterfrom
hyunw9:ZEPPELIN-6574
Open

[ZEPPELIN-6574] Add read-only REST API for interpreter process status#5403
hyunw9 wants to merge 2 commits into
apache:masterfrom
hyunw9:ZEPPELIN-6574

Conversation

@hyunw9

@hyunw9 hyunw9 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

What is this PR for?

Zeppelin server owns interpreter processes but exposes no API to see which ones are running. This adds a read-only snapshot endpoint:

GET /api/interpreter/status

[{
  "settingId": "spark", "settingName": "spark", "groupId": "spark-shared_process",
  "numSessions": 2, "started": true, "host": "127.0.0.1", "port": 51037,
  "startTime": "2026-08-09 14:20:11", "uptimeSeconds": 3184, "errorMessage": null
}]

Review point:

  • No remote probe. Built from in-memory server state only, so a stuck interpreter cannot block the call. started means a process handle exists, not that the process is reachable. A bounded liveness probe is deliberately left to ZEPPELIN-6576.

First sub-task of ZEPPELIN-6568 (server-side status and idle lifecycle for interpreter processes); the remaining sub-tasks build on this.

What type of PR is it?

Feature

Todos

  • - Add InterpreterProcessStatus, a snapshot DTO built from a ManagedInterpreterGroup
  • - Add InterpreterSettingManager#getInterpreterProcessStatuses to aggregate all running groups
  • - Add RemoteInterpreterProcess#getStartTimeMs so uptime is computed without a remote call
  • - Add the GET /api/interpreter/status endpoint
  • - Add unit and REST tests

What is the Jira issue?

How should this be tested?

Included tests, both passing on current master:

  • InterpreterSettingManagerTest#testGetInterpreterProcessStatuses - aggregation is empty before any group exists; after a session is created it reports the setting name, session count, and started=false / port=-1 for an unlaunched process. (13/13)
  • InterpreterRestApiTest#testGetInterpreterProcessStatus - endpoint returns a JSON array. (12/12)

Manually: run a paragraph, then curl -u <admin> http://localhost:8080/api/interpreter/status and confirm the interpreter appears with started: true. Restarting it from the setting page resets uptimeSeconds.

Screenshots (if appropriate)

N/A - REST only.

Questions:

  • Does the license files need to update? No.
  • Is there breaking changes for older versions? No - additive and read-only.
  • Does this needs documentation? Can add a REST API doc section here if preferred, otherwise once the sibling sub-tasks land.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant