Class: CellMonitor

CellMonitor~ CellMonitor


new CellMonitor(monitor, cell)

Class that implements a monitoring display for a single cell.
Parameters:
Name Type Description
monitor SparkMonitor The parent singleton SparkMonitor instance.
cell CodeCell The Jupyter CodeCell instance of the cell.

Methods


createDisplay()

Creates and renders the display below the cell.

removeDisplay()

Remove the display from a cell.

stopJobs()

Stop Running Jobs Stopping Jobs does not work at the moment. This interrupts the kernel currently. Issue with jupyter comm messaging while kernel is busy.

openSparkUI( [url=])

Opens the Spark UI in an IFrame.
Parameters:
Name Type Argument Description
url= string <optional>
A relative url to open within the main domain.

showView(view)

Renders a view specified
Parameters:
Name Type Description
view string The view to render- "jobs", "timeline", "tasks" or "hidden"

hideView(view)

Hides the view specified, performing any clean up necessary.
Parameters:
Name Type Description
view string The view to hide.

setBadges( [redraw])

Updates the counters on the title of the display.
Parameters:
Name Type Argument Default Description
redraw boolean <optional>
false Forces a redraw regardless of whether data has changed if true.

onCellExecutionCompleted()

Called when a cells execution is completed, as detected by the currentcell module.

onAllCompleted()

Called when all jobs have ended and the cell's execution is completed.

createJobTable()

Create and renders the job table and registers refreshers to update it.

createStageItem()

Creates HTML element for a single stage item in the table.
Returns:
- The stage row element.
Type
jQuery

updateStageItem(element, data [, redraw])

Fills data in a stage row element
Parameters:
Name Type Argument Default Description
element jQuery The stage row element
data Object The stage item data
redraw boolean <optional>
false Force a redraw even if data is not modified.

createJobItem()

Creates HTML element for a single job item in the table.
Returns:
- The job row element, containing one row item for the job and another for the expandable stages table.
Type
jQuery

updateJobItem(element, data [, redraw])

Fills data in a job row element.
Parameters:
Name Type Argument Default Description
element jQuery The job row element
data Object The job item data
redraw boolean <optional>
false Force a redraw even if data is not modified.

updateJobTable()

Updates the data in the job table

registerJobTableRefresher()

Registers a refresher to update the job table.

clearJobTableRefresher()

Clear the refreshers to update the job table.

hideJobTable()

Hide the job table.

onJobTableAllCompleted()

Called when all jobs have completed and cell execution is also completed.

onSparkJobStart()

Called when a Spark job starts.

onSparkJobEnd()

Called when a Spark job ends.

onSparkStageSubmitted()

Called when a Spark stage is submitted.

onSparkStageCompleted()

Called when a Spark stage is completed.

onSparkTaskStart()

Called when a Spark task is started.

onSparkTaskEnd()

Called when a Spark task is ended.

onSparkExecutorAdded()

Called when an executor is added to spark

onSparkExecutorRemoved()

Called when an executor is removed from spark