public class JobLogger extends Object implements SparkListener, Logging
NOTE: The functionality of this class is heavily stripped down to accommodate for a general refactor of the SparkListener interface. In its place, the EventLoggingListener is introduced to log application information as SparkListenerEvents. To enable this functionality, set spark.eventLog.enabled to true.
Constructor and Description |
---|
JobLogger() |
JobLogger(String user,
String logDirName) |
Modifier and Type | Method and Description |
---|---|
String |
logDirName() |
void |
onJobEnd(SparkListenerJobEnd jobEnd)
When job ends, recording job completion status and close log file
|
void |
onJobStart(SparkListenerJobStart jobStart)
When job starts, record job property and stage graph
|
void |
onStageCompleted(SparkListenerStageCompleted stageCompleted)
When stage is completed, record stage completion status
|
void |
onStageSubmitted(SparkListenerStageSubmitted stageSubmitted)
When stage is submitted, record stage submit info
|
void |
onTaskEnd(SparkListenerTaskEnd taskEnd)
When task ends, record task completion status and metrics
|
String |
user() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onApplicationEnd, onApplicationStart, onBlockManagerAdded, onBlockManagerRemoved, onEnvironmentUpdate, onTaskGettingResult, onTaskStart, onUnpersistRDD
initialized, initializeIfNecessary, initializeLogging, initLock, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logTrace, logTrace, logWarning, logWarning
public JobLogger(String user, String logDirName)
public JobLogger()
public String user()
public String logDirName()
public void onStageSubmitted(SparkListenerStageSubmitted stageSubmitted)
onStageSubmitted
in interface SparkListener
stageSubmitted
- Stage submitted eventpublic void onStageCompleted(SparkListenerStageCompleted stageCompleted)
onStageCompleted
in interface SparkListener
stageCompleted
- Stage completed eventpublic void onTaskEnd(SparkListenerTaskEnd taskEnd)
onTaskEnd
in interface SparkListener
taskEnd
- Task end eventpublic void onJobEnd(SparkListenerJobEnd jobEnd)
onJobEnd
in interface SparkListener
jobEnd
- Job end eventpublic void onJobStart(SparkListenerJobStart jobStart)
onJobStart
in interface SparkListener
jobStart
- Job start event