Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
aa7aa587
Commit
aa7aa587
authored
11 years ago
by
Mingfei
Browse files
Options
Downloads
Patches
Plain Diff
some format modification
parent
52407951
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/src/main/scala/spark/scheduler/DAGScheduler.scala
+2
-3
2 additions, 3 deletions
core/src/main/scala/spark/scheduler/DAGScheduler.scala
core/src/main/scala/spark/scheduler/JobLogger.scala
+5
-5
5 additions, 5 deletions
core/src/main/scala/spark/scheduler/JobLogger.scala
with
7 additions
and
8 deletions
core/src/main/scala/spark/scheduler/DAGScheduler.scala
+
2
−
3
View file @
aa7aa587
...
...
@@ -324,8 +324,7 @@ class DAGScheduler(
for
(
job
<-
activeJobs
)
{
val
error
=
new
SparkException
(
"Job cancelled because SparkContext was shut down"
)
job
.
listener
.
jobFailed
(
error
)
sparkListeners
.
foreach
(
_
.
onJobEnd
(
SparkListenerJobEnd
(
job
,
JobFailed
(
error
))))
sparkListeners
.
foreach
(
_
.
onJobEnd
(
SparkListenerJobEnd
(
job
,
JobFailed
(
error
))))
}
return
true
}
...
...
@@ -671,9 +670,9 @@ class DAGScheduler(
val
job
=
resultStageToJob
(
resultStage
)
val
error
=
new
SparkException
(
"Job failed: "
+
reason
)
job
.
listener
.
jobFailed
(
error
)
sparkListeners
.
foreach
(
_
.
onJobEnd
(
SparkListenerJobEnd
(
job
,
JobFailed
(
error
))))
activeJobs
-=
job
resultStageToJob
-=
resultStage
sparkListeners
.
foreach
(
_
.
onJobEnd
(
SparkListenerJobEnd
(
job
,
JobFailed
(
error
))))
}
if
(
dependentStages
.
isEmpty
)
{
logInfo
(
"Ignoring failure of "
+
failedStage
+
" because all jobs depending on it are done"
)
...
...
This diff is collapsed.
Click to expand it.
core/src/main/scala/spark/scheduler/JobLogger.scala
+
5
−
5
View file @
aa7aa587
...
...
@@ -70,7 +70,7 @@ class JobLogger(val logDirName: String) extends SparkListener with Logging {
}
}
//
c
reate a log file for one job, the file name is the jobID
//
C
reate a log file for one job, the file name is the jobID
protected
def
createLogWriter
(
jobID
:
Int
)
{
try
{
val
fileWriter
=
new
PrintWriter
(
logDir
+
"/"
+
logDirName
+
"/"
+
jobID
)
...
...
@@ -80,7 +80,7 @@ class JobLogger(val logDirName: String) extends SparkListener with Logging {
}
}
//
c
lose log file
for one job
, and clean the stage relationship in stageIDToJobID
//
C
lose log file, and clean the stage relationship in stageIDToJobID
protected
def
closeLogWriter
(
jobID
:
Int
)
=
jobIDToPrintWriter
.
get
(
jobID
).
foreach
{
fileWriter
=>
fileWriter
.
close
()
...
...
@@ -91,7 +91,7 @@ class JobLogger(val logDirName: String) extends SparkListener with Logging {
jobIDToStages
-=
jobID
}
//
w
rite log information to log file, withTime parameter controls whether to recored
//
W
rite log information to log file, withTime parameter controls whether to recored
// time stamp for the information
protected
def
jobLogInfo
(
jobID
:
Int
,
info
:
String
,
withTime
:
Boolean
=
true
)
{
var
writeInfo
=
info
...
...
@@ -145,7 +145,7 @@ class JobLogger(val logDirName: String) extends SparkListener with Logging {
}
}
//
g
enerate indents and convert to String
//
G
enerate indents and convert to String
protected
def
indentString
(
indent
:
Int
)
=
{
val
sb
=
new
StringBuilder
()
for
(
i
<-
1
to
indent
)
{
...
...
@@ -190,7 +190,7 @@ class JobLogger(val logDirName: String) extends SparkListener with Logging {
jobLogInfo
(
jobID
,
indentString
(
indent
)
+
stageInfo
+
" JOB_ID="
+
stage
.
priority
,
false
)
}
//
r
ecord task metrics into job log files
//
R
ecord task metrics into job log files
protected
def
recordTaskMetrics
(
stageID
:
Int
,
status
:
String
,
taskInfo
:
TaskInfo
,
taskMetrics
:
TaskMetrics
)
{
val
info
=
" TID="
+
taskInfo
.
taskId
+
" STAGE_ID="
+
stageID
+
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment