Livy objects for interactive sessions

See the following tables for Livy objects properties for interactive sessions.

Session Object

A session object represents an interactive shell:

Table 1. Session Object
Property Description Type
name Name of the session string
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 "kind" table below for values) session kind
log Log file data list of strings
state Session state (see the "state" table below for values) string
appInfo Detailed application information key=value map

The following values are valid for the kind property in a session object:

Table 2. Session Kind
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:

Table 3. Session Object State
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

A statement object represents the result of an execution statement.

Table 4. Statement Object
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:

Table 5. Statement Object State
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:

Table 6. Statement Object Output
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.