Livy Objects for Interactive Sessions
Session Object
A session object represents an interactive shell:
Property | Description | Type |
---|---|---|
id | A non-negative integer that represents a specific session of interest | int |
appId | Application ID for this session | string |
owner | Remote user who submitted this session | string |
proxyUser | User ID to impersonate when running | string |
kind | Session kind (see the following "kind" table for values) | session kind |
log | Log file data | list of strings |
state | Session state (see the following "state" table for values) | string |
appInfo | Detailed application information | key=value map |
The following values are valid for the kind
property in a
session
object:
Value | Description |
---|---|
spark | Interactive Scala Spark session |
pyspark | Interactive Python 2 Spark session |
pyspark3 | Interactive Python 3 Spark session |
sparkr | Interactive R Spark session |
The following values are valid for the state
property in a
session
object:
Value | Description |
---|---|
not_started | Session has not started |
starting | Session is starting |
idle | Session is waiting for input |
busy | Session is executing a statement |
shutting_down | Session is shutting down |
error | Session terminated due to an error |
dead | Session exited |
success | Session successfully stopped |
Statement Object
A statement object represents the result of an execution statement.
Property | Description | Type |
---|---|---|
id | A non-negative integer that represents a specific statement of interest | integer |
state | Execution state (see the following "state" table for values) | statement state |
output | Execution output (see the following "output" table for values) | statement output |
The following values are valid for the state
property in a
statement
object:
value | Description |
---|---|
waiting | Statement is queued, execution has not started |
running | Statement is running |
available | Statement has a response ready |
error | Statement failed |
cancelling | Statement is being cancelled |
cancelled | Statement is cancelled |
The following values are valid for the output
property in a
statement
object:
Property | Description | Type |
---|---|---|
status | Execution status, such as "starting", "idle", or "available". | string |
execution_count | Execution count | integer (monotonically increasing) |
data | Statement output | An object mapping a mime type to the result. If the mime type is
application/json , the value is a JSON value. |